diff --git a/StartingSolution.sln b/StartingSolution.sln index f3a32f6..c0dadac 100644 --- a/StartingSolution.sln +++ b/StartingSolution.sln @@ -5,10 +5,6 @@ VisualStudioVersion = 16.0.29509.3 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BrokerageLib", "BrokerageLib\BrokerageLib.csproj", "{07F455FF-CE11-40F2-A66E-95FA497522FB}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestingLib", "TestingLib\TestingLib.csproj", "{077F4E49-2A80-463A-B2D0-805DACB80469}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestRunner", "TestRunner\TestRunner.csproj", "{65401167-7B49-4C88-AC43-F2B4A213951B}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -19,14 +15,6 @@ Global {07F455FF-CE11-40F2-A66E-95FA497522FB}.Debug|Any CPU.Build.0 = Debug|Any CPU {07F455FF-CE11-40F2-A66E-95FA497522FB}.Release|Any CPU.ActiveCfg = Release|Any CPU {07F455FF-CE11-40F2-A66E-95FA497522FB}.Release|Any CPU.Build.0 = Release|Any CPU - {077F4E49-2A80-463A-B2D0-805DACB80469}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {077F4E49-2A80-463A-B2D0-805DACB80469}.Debug|Any CPU.Build.0 = Debug|Any CPU - {077F4E49-2A80-463A-B2D0-805DACB80469}.Release|Any CPU.ActiveCfg = Release|Any CPU - {077F4E49-2A80-463A-B2D0-805DACB80469}.Release|Any CPU.Build.0 = Release|Any CPU - {65401167-7B49-4C88-AC43-F2B4A213951B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {65401167-7B49-4C88-AC43-F2B4A213951B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {65401167-7B49-4C88-AC43-F2B4A213951B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {65401167-7B49-4C88-AC43-F2B4A213951B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/TestRunner/TestRunner.csproj b/TestRunner/TestRunner.csproj index 9c32b74..2ee36d3 100644 --- a/TestRunner/TestRunner.csproj +++ b/TestRunner/TestRunner.csproj @@ -94,11 +94,5 @@ - - - {077f4e49-2a80-463a-b2d0-805dacb80469} - TestingLib - - \ No newline at end of file diff --git a/TestingLib/TestTheComissionCalculator.cs b/TestingLib/TestTheComissionCalculator.cs new file mode 100644 index 0000000..e5197ba --- /dev/null +++ b/TestingLib/TestTheComissionCalculator.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace TestingLib +{ + public class TestTheComissionCalculator + { + [CheckThisMethod] + public void ReturnStandardCommission() + { + var unitsSold = 90; + var unitPrice = 50.00M; + var calculator = new BrokerageLib.CommissionCalculator(); + + decimal expectedCommission = (unitsSold * unitPrice) * BrokerageLib.Constants.CommissionRate.Standard; + decimal calculatedCommission = calculator.DetermineVariableRate(unitsSold, unitPrice); + + Assert.AreEqual(expectedCommission,calculatedCommission,"Commission is not correct!"); + } + } +}