Example #1
0
        [InlineData("Books", "books")]   // runs another test with these arguments
        public void ActiveMethod_ReturnsEmptyStringIfNoMatch(string s1, string s2)
        {
            // act
            string active = Nav.Active(s1, s2);

            // assert
            Assert.Equal("", active);
        }
Example #2
0
        public void ActiveMethod_ReturnsActiveStringIfMatch(string s1, string s2)
        {
            string expected = "active";       // arrange

            var result = Nav.Active(s1, s2);  // act

            Assert.Equal(expected, result);   // assert
        }
Example #3
0
        public void ActiveMethod_ReturnsAString()
        {
            string s1 = "Home";               // arrange
            string s2 = "Books";

            var result = Nav.Active(s1, s2);  // act

            Assert.IsType <string>(result);   // assert
        }