public void MyFunction_RandomValues_ValidDoubleOrDivideByZeroException(int randomValue) { _output.WriteLine("Random value: " + randomValue); if (randomValue == 5) { Assert.Throws <DivideByZeroException>(() => Lab1Utils.CallMyFunction(randomValue)); } }
public void MyFunction_RandomValues_ValidDoubleOrDivideByZeroException(int value) { Console.WriteLine("Random value: " + value); if (value == 5) { Assert.Throws <DivideByZeroException>(() => Lab1Utils.CallMyFunction(value)); } else { Assert.Pass(); } }
public void MyFunction_ValueOf5_DivideByZeroException(int criticalValue) { Lab1Utils.CallMyFunction(criticalValue); }
public void CallMyFunction_LowerThan5_NegativeValue(double value) { var res = Lab1Utils.CallMyFunction(4); Assert.IsTrue(res < 0); }
public void CallMyFunction_GreaterThan5_PositiveValue(double value) { var res = Lab1Utils.CallMyFunction(value); Assert.IsTrue(res > 0); }
public void CleanUp() { Logger.LogMessage("Test Ended - " + Lab1Utils.GetEstTime()); }
public void Init() { Logger.LogMessage("Test Started - " + Lab1Utils.GetEstTime()); }
public void MyFunction_ValueOf5_DivideByZeroException(int criticalValue) { Assert.Throws <DivideByZeroException>(() => Lab1Utils.CallMyFunction(criticalValue)); }
public void CallMyFunction_LowerThan5_NegativeValue(int value) { var res = Lab1Utils.CallMyFunction(value); Assert.True(res < 0); }
// TASK 11 public void Dispose() { _output.WriteLine("Test Ended - " + Lab1Utils.GetEstTime()); }
// TASK 11 - Global setup and tear down are impossible to implement with xUnit // TASK 11 public UnitTest1(ITestOutputHelper output) { _output = output; _output.WriteLine("Test Started - " + Lab1Utils.GetEstTime()); }
public void MyFunction_ValueOf5_DivideByZeroException() { Assert.Throws <DivideByZeroException>(() => Lab1Utils.CallMyFunction(5)); }
public void MyFunction_FirstAgeFromCsv_ValidFirstAge(int age) { Assert.Greater(Lab1Utils.CallMyFunction(age), 0); }
public void CallMyFunction_LowerThan5_NegativeValue(double value) { var res = Lab1Utils.CallMyFunction(value); Assert.That(res, Is.Negative); }
public void TearDown() { Console.WriteLine("Test Ended - " + Lab1Utils.GetEstTime()); }
public void Setup() { Console.WriteLine("Test Started - " + Lab1Utils.GetEstTime()); }