Starting MStest development
This commit is contained in:
@ -5,10 +5,6 @@ VisualStudioVersion = 16.0.29509.3
|
|||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BrokerageLib", "BrokerageLib\BrokerageLib.csproj", "{07F455FF-CE11-40F2-A66E-95FA497522FB}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BrokerageLib", "BrokerageLib\BrokerageLib.csproj", "{07F455FF-CE11-40F2-A66E-95FA497522FB}"
|
||||||
EndProject
|
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
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
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}.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.ActiveCfg = Release|Any CPU
|
||||||
{07F455FF-CE11-40F2-A66E-95FA497522FB}.Release|Any CPU.Build.0 = 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
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
@ -94,11 +94,5 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="App.config" />
|
<None Include="App.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\TestingLib\TestingLib.csproj">
|
|
||||||
<Project>{077f4e49-2a80-463a-b2d0-805dacb80469}</Project>
|
|
||||||
<Name>TestingLib</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
22
TestingLib/TestTheComissionCalculator.cs
Normal file
22
TestingLib/TestTheComissionCalculator.cs
Normal file
@ -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!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user