コード例 #1
0
 public void givenMoodAnalyserImproperMethod_whenProper_shouldReturnProperMessage()
 {
     try
     {
         object value = MoodAnalyzerReflecter.invokeMethodUsingReflaction("analyzermood");
     }
     catch (MoodAnalyzerException e)
     {
         Assert.AreEqual(MoodAnalyzerException.ExceptionType.NO_SUCH_FIELD_EXCEPTION, e.type);
     }
 }
コード例 #2
0
        public void givenMoodAnalyserMethod_whenProper_shouldReturnProperMessage()
        {
            object value = MoodAnalyzerReflecter.invokeMethodUsingReflaction("analyzerMood");

            Assert.AreEqual("Happy", value);
        }