public void MoneyConstructionSetsPluralNameWithZeroCount() { string expected = "tests"; Money money = new MoneyTestMoney(0.01m, "test", "tests"); Assert.Equal(expected, money.Name); }
public void MoneyConstructionSetsSingularNameAccurately() { string expected = "test"; Money money = new MoneyTestMoney(0.01m, "test", "tests", 1); Assert.Equal(expected, money.Name); }
public void MoneyConstructionSetsDenominationAccurately() { decimal expected = 0.01m; Money money = new MoneyTestMoney(0.01m, "test", "tests", 3); Assert.Equal(expected, money.Denomination); }
public void MoneyClearsCount() { Money money = new MoneyTestMoney(1, "test", "tests", 5); Assert.Equal(5, money.Count); money.Clear(); Assert.Equal(0, money.Count); }
public void MoneySubtractsCorrectAmount() { Money money = new MoneyTestMoney(1, "test", "tests", 5); Assert.Equal(5, money.Count); money.Subtract(1); Assert.Equal(4, money.Count); money.Subtract(-1); Assert.Equal(5, money.Count); }
public void MoneyAddsCorrectAmount() { Money money = new MoneyTestMoney(1, "test", "tests"); Assert.Equal(0, money.Count); money.Add(1); Assert.Equal(1, money.Count); money.Add(-1); Assert.Equal(0, money.Count); }