示例#1
0
 public void GivenImproperName_ThrowNoSuchMethodExceptionWhileInvokingMethod(string methodName, string message, string expected)
 {
     try
     {
         //Arrange
         //Act
         string actual = MoodAnalyzerReflection.InvokeAnalyseMood(methodName, message);
         //Assert
         Assert.AreEqual(expected, actual);
     }
     catch (MoodAnalyzerException ex)
     {
         //Act
         string actual = ex.Message;
         //Assert
         Assert.AreEqual(expected, actual);
     }
 }
示例#2
0
 public void GivenProperName_InvokeAnalyseMoodWithReflection(string methodName, string message, string expected)
 {
     try
     {
         //Arrange
         //Act
         string actual = MoodAnalyzerReflection.InvokeAnalyseMood(methodName, message);
         //Assert
         Assert.AreEqual(expected, actual);
     }
     catch (MoodAnalyzerException ex)
     {
         //Act
         string actual = ex.Message;
         //Assert
         Assert.AreEqual(expected, actual);
     }
 }