public void constructor_should_set_right_number() { // Given var nbr = new Variable("a", new RealNumber(1)); // When SUT = new Division(new Variable("b", new RealNumber(1)), nbr); // Then Assert.AreSame(nbr, SUT.RightSide); }
public void calculate_should_return_real_number_with_division_value() { // Given SUT = new Division(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_division() { // Given SUT = new Division(new RealNumber(6.0), new RealNumber(2.0)); // When var result = SUT.Calculate() as RealNumber; // Then Assert.AreEqual(3, result.Value); }
public void getRealNumber_should_return_number_that_is_the_division() { // Given SUT = new Division(new RealNumber(6.0), new RealNumber(2.0)); // When var result = SUT.GetRealNumber(); // Then Assert.AreEqual(3.0, result.Value); }
public void Teardown() { SUT = null; }
public void Setup() { SUT = new Division(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 Division(new RealNumber(1), nbr.Object); // When SUT.Regenerate(); // Then nbr.Verify(x => x.Regenerate()); }