Ejemplo n.º 1
0
        public void GivenHappyMessageUsingReflectionWhenProperShouldReturnHappy()
        {
            //Arrange
            //Act
            string check = MoodAnalyserRefection.InvokeAnalyseMood("HAPPY", "AnalyseMood");

            //Assert
            Assert.AreEqual("HAPPY", check);
        }
Ejemplo n.º 2
0
 public void GivenImproperMethodNameShouldThrowMoodAnalysisCustomExceptionIndicatingNo_Such_Method()
 {
     try
     {
         //Act
         string actual = MoodAnalyserRefection.InvokeAnalyseMood("HAPPY", "WrongMethodName");
     }
     catch (MoodAnalysisCustomException e)
     {
         //Assert
         Assert.AreEqual("no such method.", e.Message);
     }
 }