public void BrokerWithCommissionListOfNull_ThrowsException() { //Arrange var broker = new DigiCoinBroker(new List<CommissionEntry> { null, null }, 1); //Act //Assert broker.GetCommission(10); }
public void CommissionSetArray1_ReturnsTheCommission() { //arrange const decimal expected = 0.03m; var commissionTable = new List<CommissionEntry> { new CommissionEntry(20, expected), new CommissionEntry(60, 1.34m), new CommissionEntry(100, 1.35m), }; var broker = new DigiCoinBroker(commissionTable, 1.44m); //act var result = broker.GetCommission(20); //asset Assert.AreEqual(expected, result); }
public void OrderMoreThen100_ThrowsException() { //Arrange var broker = new DigiCoinBroker(new List<CommissionEntry> { null, null }, 1); //Act //Assert broker.GetCommission(110); }
public void OrderNot10Multiplication_ThrowsException() { //Arrange var broker = new DigiCoinBroker(new List<CommissionEntry> { null, null }, 1); //Act //Assert broker.GetCommission(9); }
public void CommissionSetToSomeNumber_ReturnsTheCommission() { //arrange const decimal expected = 0.03m; var broker = new DigiCoinBroker(expected, 1.44m); //act var result = broker.GetCommission(20); //asset Assert.AreEqual(expected, result); }