Ejemplo n.º 1
0
        public void GivenHappyMessageWithReflectionShouldReturnHappy()
        {
            //Act
            string actual = MoodAnalyserRefection.SetField("HAPPY", "message");

            //Assert
            Assert.AreEqual("HAPPY", actual);
        }
Ejemplo n.º 2
0
 public void GivenNullMessageShouldThrowMoodAnalysisCUstomExceptionIndicatingNullMessage()
 {
     try
     {
         //Act
         string actual = MoodAnalyserRefection.SetField(null, "message");
     }
     catch (MoodAnalysisCustomException e)
     {
         //Assert
         Assert.AreEqual("Message should not be null.", e.Message);
     }
 }
Ejemplo n.º 3
0
 public void GivenImproperFieldNameShouldThrowMoodAnalysisCUstomExceptionIndicatingNoSuchField()
 {
     try
     {
         //Act
         string actual = MoodAnalyserRefection.SetField("HAPPY", "wrongName");
     }
     catch (MoodAnalysisCustomException e)
     {
         //Assert
         Assert.AreEqual("NO such field found", e.Message);
     }
 }