Beispiel #1
0
        public void GivenSadMessage_WhenAnalyse_ShouldReturnSad()
        {
            MoodAnalyzer.MoodAnalysis moodAnalysis = new MoodAnalyzer.MoodAnalysis();
            string mood = moodAnalysis.AnalysisOfMood("This is Sad message");

            Assert.AreEqual("Sad", mood);
        }
Beispiel #2
0
        public object InvokeToChangeMood(string mood)
        {
            MoodAnalysis moodObject   = new MoodAnalysis("Happy");
            object       invokeObject = moodObject.analysisOfMood();

            return(invokeObject);
        }
Beispiel #3
0
 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);
     }
 }