public void constructor_should_set_right_number() { // Given var nbr = new Variable("a", new RealNumber(1)); // When SUT = new Multiplication(new Variable("b", new RealNumber(1)), nbr); // Then Assert.AreSame(nbr, SUT.RightSide); }
public void calculate_should_return_real_number_with_multi_value() { // Given SUT = new Multiplication(new RealNumber(2.0), new RealNumber(6.0)); // When var result = SUT.Calculate(); // Then Assert.IsInstanceOf<RealNumber>(result); }
public void calculate_should_return_number_that_is_the_multi() { // Given SUT = new Multiplication(new RealNumber(2.0), new RealNumber(6.0)); // When var result = SUT.Calculate() as RealNumber; // Then Assert.AreEqual(12.0, result.Value); }
public void Teardown() { SUT = null; }
public void Setup() { SUT = new Multiplication(new Variable("a", new RealNumber(1)), new Variable("b", new RealNumber(1))); }
public void regenerate_should_regenerate_right_number() { // Given var nbr = new Mock<Number>(); SUT = new Multiplication(new RealNumber(1), nbr.Object); // When SUT.Regenerate(); // Then nbr.Verify(x => x.Regenerate()); }