public void TheMachine_InvalidArguments_Throws() { Assert.That(() => TheMachine.GetTheAnswer(""), Throws.ArgumentNullException); Assert.That(() => TheMachine.GetTheAnswer(" "), Throws.ArgumentNullException); Assert.That(() => TheMachine.GetTheAnswer(null), Throws.ArgumentNullException); }
public void TheMachine_GetAnwer_CorrectResult() { Int32 answer = TheMachine.GetTheAnswer("To all and everything in the universe"); Assert.That(answer, Is.EqualTo(42)); }
static void Main(string[] args) { Console.WriteLine("Hello world"); Console.WriteLine($"The answer is: {TheMachine.GetTheAnswer("Give it to me")}"); Console.WriteLine("Thats good to know!"); }