コード例 #1
0
        public void Test_Fecthing_File_Content_When_File_Does_Not_Exist()
        {
            //arrange
            StaticFileHandler file = new StaticFileHandler();
            //act
            string fileContent = file.TryGetFile("C://WebPages//google//index.htm");

            //assert
            Assert.Equal("<HTML><BODY><h1>404 Not Found</h1><p>Web Page not found!!!!!!!!!!!</p></BODY></HTML>", fileContent);
        }
コード例 #2
0
        public void Test_Get_File_Content()
        {
            //arrange
            StaticFileHandler file = new StaticFileHandler();
            //act
            string fileContent = file.TryGetFile("C://WebPages//google//hello.htm");

            //assert
            Assert.Equal("<HTML><BODY><h1>Hello</h1></BODY></HTML>", fileContent);
        }