예제 #1
0
        public void TestAnythingElse()         // default
        {
            // Arrange
            Bob b = new Bob();

            strCommunication = "Sorry";

            // Act
            string strResult = b.Conversation(strCommunication);

            // Assert
            Assert.AreEqual("Whatever.", strResult);
        }
예제 #2
0
        public void TestNothing()         // null
        {
            // Arrange
            Bob b = new Bob();

            strCommunication = "";

            // Act
            string strResult = b.Conversation(strCommunication);

            // Assert
            Assert.AreEqual("Fine. Be that way!", strResult);
        }
예제 #3
0
        public void TestYell()         // !
        {
            // Arrange
            Bob b = new Bob();

            strCommunication = "Just, Shut up!";

            // Act
            string strResult = b.Conversation(strCommunication);

            // Assert
            Assert.AreEqual("Whoa, Chill out!", strResult);
        }
예제 #4
0
        public void TestYellnQuestion()         // !?
        {
            // Arrange
            Bob b = new Bob();

            strCommunication = "Oh God!, What the hell are you doing?";

            // Act
            string strResult = b.Conversation(strCommunication);

            // Assert
            Assert.AreEqual("Calm down, I know what I'm doing!", strResult);
        }
예제 #5
0
        public void TestQuestion()         //?
        {
            // Arrange
            Bob b = new Bob();

            strCommunication = "Can you do this job for me?";

            // Act
            string strResult = b.Conversation(strCommunication);

            // Assert
            Assert.AreEqual("Sure.", strResult);
        }