static void Main(string[] args) { var mikeCalc = new OneCalculatorToRuleThemAll <MikesNumbers>(); mikeCalc.Add(new MikesNumbers("Blah"), new MikesNumbers("Foo")); Console.ReadLine(); IntCalculator c = new IntCalculator(); c.Add(5, 8); c.Multiply(5, 8); c.Subtract(5, 8); c.Mod(5, 8); FloatCalculator c2 = new FloatCalculator(); float result = c2.Add(5.6f, 4.3f); c2.Subtract(5.6f, 4.3f); CustomNumberCalculator c3 = new CustomNumberCalculator(); var num1 = new CustomNumber("Daniel"); var num2 = new CustomNumber("Mike"); CustomNumber num3 = c3.Add(num1, num2); c3.Multiply(num1, num2); c3.Subtract(num1, num2); c3.Mod(num1, num2); Console.ReadLine(); }
public void Ints() { var sut = new IntCalculator(); var fixture = new Fixture(); sut.Subtract(fixture.Create <int>()); Assert.True(sut.Value < 0); }
public void Ints() { // arrange var sut = new IntCalculator(); // act sut.Subtract(1); // assert Assert.True(sut.Value < 0); }
public void Ints() { //arrange var sut = new IntCalculator(); var fixture = new Fixture(); //act sut.Subtract(fixture.Create <int>()); Assert.That(sut.Value, Is.LessThan(0)); }
public void Ints() { // arrange var sut = new IntCalculator(); Fixture fixture = new Fixture(); // act sut.Subtract(fixture.Create <int>()); // assert Assert.True(sut.Value < 0); }
public void Ints() { // arrange var sut = new IntCalculator(); var anonymousNumber = 1; // act sut.Subtract(anonymousNumber); // assert Assert.True(sut.Value < 0); }
public void Manual_Anonymous_Data() { //arrange var sut = new IntCalculator(); var anonymousNumber = 394; //act sut.Subtract(anonymousNumber); //assert Assert.True(sut.Value < 0); }
public void AutoFixture_Anonymous_Data() { //arrange var sut = new IntCalculator(); var fixture = new Fixture(); //act sut.Subtract(fixture.Create <int>()); // creating an anonymous int // int is passed as value to subtract //assert Assert.True(sut.Value < 0); }