public void Convert_AddTermWithAddend_ShouldBeTheCorrectSum(double term, double addend, double expectedSum) { m_additionConverter.Addend = addend; var actualSum = m_additionConverter.Convert <double>(term); actualSum.Should().Be(expectedSum); }
public void AdditionConverter_Convert() { AdditionConverter converter = new AdditionConverter(); converter.Value = 2; object result = converter.Convert(1, null, null, null); Assert.Equal(3, result); converter.Value = -5; result = converter.Convert(3, null, null, null); Assert.Equal(-2, result); result = converter.Convert(null, null, null, null); Assert.Null(result); }