Exemplo n.º 1
0
        public void returnForNull()
        {
            MoodAnalyse analyse = new MoodAnalyse();
            string      mood    = analyse.analyseMood();

            Assert.AreEqual("HAPPY", mood);
        }
Exemplo n.º 2
0
        public void analyseHappyMood()
        {
            MoodAnalyse analyse = new MoodAnalyse("I am in Happy Mood");
            string      mood    = analyse.analyseMood();

            Assert.AreEqual("HAPPY", mood);
        }
Exemplo n.º 3
0
        public void analyseSadMood()
        {
            MoodAnalyse analyse = new MoodAnalyse("SAD");
            string      mood    = analyse.analyseMood();

            Assert.AreEqual("SAD", mood);
        }
Exemplo n.º 4
0
        public void TestMethod1(string message)
        {
            //Arrange
            string      expected = "SAD";
            MoodAnalyse mood     = new MoodAnalyse(message);
            //Act
            var result = mood.analyseMood();

            //Assert
            Assert.AreEqual(expected, result);
        }
Exemplo n.º 5
0
 public void Given_NULL_Mood_Should_Throw_MoodAnalysisException()
 {
     try
     {
         string      message     = null;
         MoodAnalyse moodAnalyse = new MoodAnalyse(message);
         string      mood        = moodAnalyse.analyseMood();
     }
     catch (MoodAnalysisException e)
     {
         Assert.AreEqual("Mood should not be null", e.Message);
     }
 }
Exemplo n.º 6
0
 public void Given_Empty_Mood_Should_Throw_MoodAnalysisException_Indicating_EmptyMood()////checking empty mood
 {
     try
     {
         string      message = string.Empty;
         MoodAnalyse mood    = new MoodAnalyse(message);
         string      moodStr = mood.analyseMood();
     }
     catch (MoodAnalysisException e)
     {
         Assert.AreEqual("Mood should not be empty", e.Message);
     }
 }