Esempio n. 1
0
        public bool Equals(object that)
        {
            MoodAnalyzer moodAnalyser = (MoodAnalyzer)that;

            if (this.Message.Equals(moodAnalyser.Message))
            {
                return(true);
            }

            return(false);
        }
Esempio n. 2
0
 public void Given_MessageInConstructor_WhenNull_ShouldThowMoodAnalysisException()
 {
     try
     {
         MoodAnalyzer moodAnalyzer = new MoodAnalyzer(null);
         string       mood         = moodAnalyzer.AnalyzeMood();
         Assert.AreEqual(HAPPY, mood);
     }
     catch (MoodAnalyzerException e)
     {
         Assert.AreEqual(MoodAnalyzerException.ExceptionType.NULL, e.ExceptionTypes);
     }
 }