public void Given_nullmood_Expecting_Exception_Result() { //Arrange MoodToAnalyse mood = new MoodToAnalyse(null); string expected = "Object reference not set to an instance of an object"; //Act string actual = mood.Analyser(); //Assert Assert.AreEqual(expected, actual); }
public void Given_nullmood_Expecting_happy_Result() { //Arrange MoodToAnalyse mood = new MoodToAnalyse(null); string expected = "happy"; //Act string actual = mood.Analyser(); //Assert Assert.AreEqual(expected, actual); }
public void Given_Happymood_Expecting_Happy_Results() { //Arrange MoodToAnalyse mood = new MoodToAnalyse("I am in happy mood"); string expected = "happy"; //Act string actual = mood.Analyser(); //Assert Assert.AreEqual(expected, actual); }
public void Given_Emptymood_Using_CustomException_Return_Empty() { //Arrange MoodToAnalyse mood = new MoodToAnalyse(""); string expected = "Mood should not be empty"; try { //Act string actual = mood.Analyser(); } catch (MoodAnalyserException exception) { //Assert Assert.AreEqual(expected, exception.Message); } }