public void GivenMoodMessageToInvokeUsingReflectionMethod_WhenNotProper_ShouldThrowException() { try { string result = MoodAnalyserReflaction.InvokeMethodUsingReflection("007AnalyseMood", "I am in Any Mood"); } catch (MoodAnalyserException e) { Assert.AreEqual(MoodAnalyserException.ExceptionType.No_Class_Method, e.type); } }
public void givenMood_whenAnalysisMood_SetFieldValueShouldReturnHappy() { string result = MoodAnalyserReflaction.InvokeMethodUsingReflection("AnalyserMood", "I am in Any Mood"); Assert.AreEqual("Happy", result); }