Beispiel #1
0
        public void Given_Happy_Mood_Using_Reflection_When_Proper_Should_Return_Happy()
        {
            string expected = "HAPPY";
            string mood     = MoodAnalyseReflector.InvokeAnalyseMood("Happy", "AnalyseMood");

            Assert.AreEqual(expected, mood);
        }
Beispiel #2
0
 public void Given_Happy_Message_But_Improper_Method_Should_throw_MoodAnalysisException_Indicating_NoSuchMethod()
 {
     try
     {
         string expected = "HAPPY";
         string mood     = MoodAnalyseReflector.InvokeAnalyseMood("Happy", "AnalyyseMood");
         expected.Equals(mood);
     }
     catch (MoodAnalyserCustomException e)
     {
         Assert.AreEqual("Constructor is Not Found", e.Message);
     }
 }