public void GivenSadMessage_WhenAnalyse_ShouldReturnSad() { MoodAnalyzer.MoodAnalysis moodAnalysis = new MoodAnalyzer.MoodAnalysis(); string mood = moodAnalysis.AnalysisOfMood("This is Sad message"); Assert.AreEqual("Sad", mood); }
public object InvokeToChangeMood(string mood) { MoodAnalysis moodObject = new MoodAnalysis("Happy"); object invokeObject = moodObject.analysisOfMood(); return(invokeObject); }
public void GivenSadMessageEmpty_WhenAnalyse_ShouldThrowException() { try { MoodAnalyzer.MoodAnalysis moodAnalysis = new MoodAnalyzer.MoodAnalysis(); string mood = moodAnalysis.AnalysisOfMood(" "); } catch (MoodAnalyzerException e) { Assert.AreEqual(MoodAnalyzerException.ExceptionType.EnterEmpty, e.Type); } }