public void StockPrice_EqualsMethod_ReturnsFalseWhenPriceNotEqual() { // Arrange var stockPrice1 = new StockPrice( new DateTime(2020, 1, 1), 6.28m ); var stockPrice2 = new StockPrice( new DateTime(2019, 1, 1), 3.14m // Different Price value. ); // Act var result = stockPrice1.Equals(stockPrice2); // Assert Assert.IsFalse(result); }
public void StockPrice_EqualsMethod_ReturnsTrue() { // Arrange var stockPrice1 = new StockPrice( new DateTime(2019, 1, 1), 3.14m ); var stockPrice2 = new StockPrice( new DateTime(2019, 1, 1), 3.14m ); // Act var result = stockPrice1.Equals(stockPrice2); // Assert Assert.IsTrue(result); }