public void TryAdd_Should_ReturnFalse_When_NotSubtractableValue() { const double baseValue = 12; var value = new StructStub(); Assert.False(CalculateUtilities.TryAdd(baseValue, value, out _)); }
public void TryAdd_Should_ReturnFalse_When_NotSubtractableBase() { const int baseValue = 12; const double value = 1; Assert.False(CalculateUtilities.TryAdd(baseValue, value, out _)); }
public void TryAdd_Should_ReturnTrue() { var baseValue = new DateTime(2018, 1, 1, 12, 30, 45).ToLocalTime(); var value = TimeSpan.FromDays(1); Assert.True(CalculateUtilities.TryAdd(baseValue, value, out var _result)); Assert.Equal(new DateTime(2018, 1, 2, 12, 30, 45).ToLocalTime(), _result); }