public void givenMoodAnalyserImproperMethod_whenProper_shouldReturnProperMessage() { try { object value = MoodAnalyzerReflecter.invokeMethodUsingReflaction("analyzermood"); } catch (MoodAnalyzerException e) { Assert.AreEqual(MoodAnalyzerException.ExceptionType.NO_SUCH_FIELD_EXCEPTION, e.type); } }
public void givenMoodAnalyserMethod_whenProper_shouldReturnProperMessage() { object value = MoodAnalyzerReflecter.invokeMethodUsingReflaction("analyzerMood"); Assert.AreEqual("Happy", value); }