public void TestNormal() { double x = BusinesLogic.Factorial(3); Assert.Equal(6, x); return; }
public void OnPost(int?number) { try { Result = BusinesLogic.Factorial(number).ToString(); }catch (Exception e) { Result = e.Message + ". Повторите ввод"; } }
public void TestNull() { try { double x = BusinesLogic.Factorial(null); } catch (Exception e) { Assert.Equal("Recieved null", e.Message); } return; }
public void TestNegative() { try { double x = BusinesLogic.Factorial(-1); } catch (Exception e) { Assert.Equal("Number is less than 1", e.Message); } return; }