public void GreaterThan5_whenInputsNonZero_ReturnsTrue() { //Arrange _someFunctions.AddFunction(Arg.Any <int>(), Arg.Any <int>()).Returns(10); //Mocking dependency class to return 10 for any int inputs //Action var result = sut.GreaterThan5(5, 6); //inputs are useless as we are mocking the dependency method to return 10 //Assert Assert.True(result); }
/// <summary> /// Checks if addition of both numbers is greater than 5 /// for all non zero integers else returns false /// </summary> /// <param name="a"></param> /// <param name="b"></param> /// <returns></returns> public bool GreaterThan5(int a, int b) { if (a == 0 || b == 0) { return(false); } return(5 < _someFunctions.AddFunction(a, b)); }