public void GivenSadMoodReturnSad() { //Arrange MoodAnalyze moodAnalyze = new MoodAnalyze(); //Act var result = moodAnalyze.analyzeMood("I am in Sad Mood"); //Assert Assert.AreEqual("SAD", result); }
public void GivenHappyMoodInConstructorReturnHappy(string message) { //Arrange MoodAnalyze moodAnalyze = new MoodAnalyze(message); //Act var result = moodAnalyze.analyzeMood(); //Assert Assert.AreEqual("HAPPY", result); }
public void TestMethod4(string message) { //Arrange MoodAnalyze moodAnalyze = new MoodAnalyze(message); //Act var result = moodAnalyze.AnalyzeMood(); //Assert Assert.AreEqual("HAPPY", result); }
public void GivenHappyMoodReturnHappy() { //Arrange MoodAnalyze moodAnalyze = new MoodAnalyze(); //Act var result = moodAnalyze.analyzeMood("I am in Happy Mood"); //Assert Assert.AreEqual("HAPPY", result); }
public void TestMethod2() { //Arrange MoodAnalyze moodAnalyze = new MoodAnalyze(); //Act var result = moodAnalyze.AnalyzeMood("I am in Happy Mood"); //Assert Assert.AreEqual("HAPPY", result); }
public void TestMethod1() { //Arrange MoodAnalyze moodAnalyze = new MoodAnalyze(); //Act var result = moodAnalyze.AnalyzeMood("I am in Sad Mood"); //Assert Assert.AreEqual("SAD", result); }
public void GivenMoodAnalyzeClassName_ShouldReturnMoodAnalyseObject() { //Arrange string message = null; object expected = new MoodAnalyze(message); //Act object obj = MoodAnalyserFactory.CreateMoodAnalyserObject("MoodAnalyzer.MoodAnalyze", "MoodAnalyze"); //Assert expected.Equals(obj); }
public void GivenMoodAnalyseClassName_ShouldReturnMoodAnalyseObject() { //Arrange string message = null; object expected = new MoodAnalyze(message); //Act object obj = MoodAnalyzerFactory.CreateMoodAnalyser("MoodAnalyzerProblem.MoodAnalyze", "MoodAnalyze"); //Assert expected.Equals(obj); Assert.AreEqual(expected.GetType(), obj.GetType()); }
public void GivenEmptyMoodThrowMoodAnalyzerExceptionEmptyMessage(string message) { try { //Arrange MoodAnalyze moodAnalyze = new MoodAnalyze(message); //Act var result = moodAnalyze.analyzeMood(); } catch (MoodAnalyzerException e) { //Assert Assert.AreEqual("Mood should not be empty", e.Message); } }
public void TestMethod6(string message) { try { //Arrange MoodAnalyze moodAnalyze = new MoodAnalyze(message); //Act var result = moodAnalyze.AnalyzeMood(); } catch (MoodAnalyzeException e) { //Assert Assert.AreEqual("Mood should not be empty", e.Message); } }
public void GivenMoodAnalyzeImproperConstructorName_ShouldThrowMoodAnalysisException() { try { //Arrange string message = null; object expected = new MoodAnalyze(message); //Act object obj = MoodAnalyzerFactory.CreateMoodAnalyser("MoodAnalyzerProblem.MoodAnalyze", "MoodAnalyz"); } catch (MoodAnalyzerException e) { //Assert Assert.AreEqual("Constructor is not found", e.Message); } }
public void GivenMoodAnalyzeImproperConstructorName_ShouldThrowMoodAnalysisExceptionForParameterisedConstructor() { try { //Arrange string message = null; object expected = new MoodAnalyze(message); //Act object obj = MoodAnalyserFactory.CreateMoodAnalyserObjectUsingParameterisedConstructor("MoodAnalyzer.MoodAnalyze", "ModAnalize", message); } catch (MoodAnalyzeException e) { //Assert Assert.AreEqual("constructor not found", e.Message); } }
public void GivenMoodAnalyzeImproperClassName_ShouldThrowMoodAnalysisException() { try { //Arrange string message = null; object expected = new MoodAnalyze(message); //Act object obj = MoodAnalyserFactory.CreateMoodAnalyserObject("MoodAnalyzer.ModAnalize", "ModAnalize"); } catch (MoodAnalyzeException e) { //Assert Assert.AreEqual("class not found", e.Message); } }