public void CalculatorRepository_DivideTwoNumbers_ShouldBeCorrectInt() { CalculatorRepository calcRepo = new CalculatorRepository(); int actual = calcRepo.DivideTwoNumbers(1, 1); Assert.AreEqual(1, actual); }
public void CalculatorRepository_DivideTwoNumbers_ShouldReturnCorrectValue() { var actual = _calcRepoTest.DivideTwoNumbers(a, b); var expected = 5m; Assert.AreEqual(expected, actual); }
public void TestMethod4() { CalculatorRepository calcRepo = new CalculatorRepository(); int actual = calcRepo.DivideTwoNumbers(4, 2); int expected = 2; Assert.AreEqual(expected, actual); }
public void Division() { CalculatorRepository calcRepo = new CalculatorRepository(); int actual = calcRepo.DivideTwoNumbers(16, 4); int expected = 4; Assert.AreEqual(expected, actual); }
public void Calculator_DivideTwoNumbers_ShouldBeCorrectValue() { CalculatorRepository calcRepo = new CalculatorRepository(); decimal actualValue = calcRepo.DivideTwoNumbers(12, 3); decimal expected = 4; Assert.AreEqual(expected, actualValue); }
public void CalculatorRepository_DivideTwoNumbers_ShouldReturnCorrectInt() { // Arrange CalculatorRepository calculatorRepo = new CalculatorRepository(); // Act int actual = calculatorRepo.DivideTwoNumbers(2, 2); // Assert Assert.AreEqual(1, actual); }
public void Calculator_DivideTwoNumbers_ShouldBeCorrectValue() { //Arrange CalculatorRepository calcRepo = new CalculatorRepository(); //Act int actualValue = calcRepo.DivideTwoNumbers(9, 3); int expected = 3; //Assert Assert.AreEqual(expected, actualValue); }
public void DivideTwoNumbersUI() { Console.WriteLine("Enter the first number: "); string numberOneAsString = Console.ReadLine(); int divOne = int.Parse(numberOneAsString); Console.WriteLine("Enter the second number: "); string numberTwoAsString = Console.ReadLine(); int divTwo = int.Parse(numberTwoAsString); _mathRepo.DivideTwoNumbers(divOne, divTwo); }
public void Divide() { Console.WriteLine("\nWhat is your first number?\n"); string inputOneStr = Console.ReadLine(); float numOne = float.Parse(inputOneStr); Console.WriteLine("\nWhat is the second number?\n"); string inputTwoStr = Console.ReadLine(); float numTwo = float.Parse(inputTwoStr); _calcRepo.DivideTwoNumbers(numOne, numTwo); Console.WriteLine("\nPress any key to continue..."); Console.ReadKey(); Console.Clear(); RunMenu(); }
public void CalculatorRepository_DivideTwoNumbers_ShouldReturnCorrectInt() { Assert.AreEqual(9, calculatorRepo.DivideTwoNumbers(81, 9)); }