public void Given_HappyMessageWithReflector_Should_Return_Happy()
        {
            string expected = "HAPPY";
            string result   = MoodAnalyzerRecflector.SetField("HAPPY", "message");

            Assert.AreEqual(expected, result);
        }
        public void Given_HappyMood_UsingReflection_When_Proper_Should_Return_Happy()
        {
            string expected = "HAPPY";
            string mood     = MoodAnalyzerRecflector.InvokeAnalyzeMood("Happy", "AnalyseMood");

            Assert.AreEqual(expected, mood);
        }
 public void Given_HappyMessageImproperField_Should_Throw_MoodAnalysisCustomException()
 {
     try
     {
         string result = MoodAnalyzerRecflector.SetField("HAPPY", "any");
     }
     catch (MoodAnalysisCustomException e)
     {
         Assert.AreEqual("Field not found", e.Message);
     }
 }
 public void Given_NullMessageWithReflection_Should_Throw_MoodAnalysisCustomException()
 {
     try
     {
         string message = null;
         string result  = MoodAnalyzerRecflector.SetField(message, "message");
     }
     catch (MoodAnalysisCustomException e)
     {
         Assert.AreEqual("Message should not be null", e.Message);
     }
 }
 public void Given_HappyMessage_But_ImproperMethod_Should_throw_MoodAnalysisException()
 {
     try
     {
         string expected = "HAPPY";
         string mood     = MoodAnalyzerRecflector.InvokeAnalyzeMood("Happy", "AnalyyzeMood");
         expected.Equals(mood);
     }
     catch (MoodAnalysisCustomException e)
     {
         Assert.AreEqual("Method Not Found", e.Message);
     }
 }