public void configure_Temp_Path_XmlDatabase()
        {
            var nUnitTests_Cassini = new NUnitTests_Cassini_TeamMentor().start(makeTcpRequestToPort : false);

            var tmProxy = nUnitTests_Cassini.tmProxy();
            tmProxy.set_Custom_Path_XmlDatabase("");
            tmProxy.get_Custom_Path_XmlDatabase().assert_Empty();                            // before a call to configure_Temp_Path_XmlDatabase this should not be set

            nUnitTests_Cassini.use_Temp_Path_XmlDatabase();

            tmProxy.get_Custom_Path_XmlDatabase().assert_Not_Empty();                        // now it should be temp_Path_XmlDatabase

            var temp_Path_XmlDatabase = tmProxy.get_Custom_Path_XmlDatabase();

            tmProxy.map_ReferencesToTmObjects()                                             // before the first request
                   .TmFileStorage.assert_Null();                                            // TmFileStorage should be null

            nUnitTests_Cassini.apiCassini.url().assert_Not_Null()                           // this is the first GET request which will
                                               .GET("/").assert_Contains("TeamMentor");     // trigger the load of TM

            tmProxy.map_ReferencesToTmObjects()                                             // after the first request
                   .TmFileStorage.assert_Not_Null()                                         // TmFileStorage should be set
                   .Path_XmlDatabase.assert_Equals(temp_Path_XmlDatabase);

            nUnitTests_Cassini.stop();
            temp_Path_XmlDatabase.files().files_Attribute_ReadOnly_Remove();
            Files.delete_Folder_Recursively(temp_Path_XmlDatabase);
            if(temp_Path_XmlDatabase.folder_Exists())
                "temp_Path_XmlDatabase was not not deleted ok".assert_Ignore();

            temp_Path_XmlDatabase.assert_Folder_Not_Exists();
        }
Пример #2
0
        public static NUnitTests_Cassini_TeamMentor delete_Temp_Path_XmlDatabase(this NUnitTests_Cassini_TeamMentor nUnitTests_Cassini)
        {
            var path_XmlDatabase = nUnitTests_Cassini.tmProxy().get_Custom_Path_XmlDatabase()
                                   .assert_Folder_Exists();

            nUnitTests_Cassini.stop();
            path_XmlDatabase.files().files_Attribute_ReadOnly_Remove();
            Files.delete_Folder_Recursively(path_XmlDatabase);
            if (path_XmlDatabase.folder_Exists())
            {
                "temp_Path_XmlDatabase was not not deleted ok".assert_Ignore();
            }
            path_XmlDatabase.assert_Folder_Not_Exists();
            return(nUnitTests_Cassini);
        }
        public void start()
        {
            var nUnitTests_TeamMentor = new NUnitTests_Cassini_TeamMentor();

            nUnitTests_TeamMentor.start();

            nUnitTests_TeamMentor.port      .tcpClient().assert_Not_Null();
            var homePage_Html= nUnitTests_TeamMentor.apiCassini.url().GET();
            homePage_Html.assert_Contains("<html>","<head>","</head>","</html>")
                         .assert_Equal_To(nUnitTests_TeamMentor.webRoot.pathCombine("default.htm").fileContents());

            //            nUnitTests_TeamMentor.script_Me().waitForClose();

            nUnitTests_TeamMentor.stop();
            nUnitTests_TeamMentor.port      .tcpClient().assert_Null();
            nUnitTests_TeamMentor.webRoot.assert_Folder_Exists();
        }
Пример #4
0
        [Test] public void start()
        {
            var nUnitTests_TeamMentor = new NUnitTests_Cassini_TeamMentor();

            nUnitTests_TeamMentor.start();

            nUnitTests_TeamMentor.port.tcpClient().assert_Not_Null();
            var homePage_Html = nUnitTests_TeamMentor.apiCassini.url().GET();

            homePage_Html.assert_Contains("<html>", "<head>", "</head>", "</html>")
            .assert_Equal_To(nUnitTests_TeamMentor.webRoot.pathCombine("default.htm").fileContents());

//            nUnitTests_TeamMentor.script_Me().waitForClose();

            nUnitTests_TeamMentor.stop();
            nUnitTests_TeamMentor.port.tcpClient().assert_Null();
            nUnitTests_TeamMentor.webRoot.assert_Folder_Exists();
        }
Пример #5
0
        [Test] public void configure_Temp_Path_XmlDatabase()
        {
            var nUnitTests_Cassini = new NUnitTests_Cassini_TeamMentor().start(makeTcpRequestToPort: false);

            var tmProxy = nUnitTests_Cassini.tmProxy();

            tmProxy.set_Custom_Path_XmlDatabase("");
            tmProxy.get_Custom_Path_XmlDatabase().assert_Empty();                            // before a call to configure_Temp_Path_XmlDatabase this should not be set

            nUnitTests_Cassini.use_Temp_Path_XmlDatabase();

            tmProxy.get_Custom_Path_XmlDatabase().assert_Not_Empty();                        // now it should be temp_Path_XmlDatabase

            var temp_Path_XmlDatabase = tmProxy.get_Custom_Path_XmlDatabase();

            tmProxy.map_ReferencesToTmObjects()                                             // before the first request
            .TmFileStorage.assert_Null();                                                   // TmFileStorage should be null



            nUnitTests_Cassini.apiCassini.url().assert_Not_Null()                           // this is the first GET request which will
            .GET("/").assert_Contains("TeamMentor");                                        // trigger the load of TM

            tmProxy.map_ReferencesToTmObjects()                                             // after the first request
            .TmFileStorage.assert_Not_Null()                                                // TmFileStorage should be set
            .Path_XmlDatabase.assert_Equals(temp_Path_XmlDatabase);

            nUnitTests_Cassini.stop();
            temp_Path_XmlDatabase.files().files_Attribute_ReadOnly_Remove();
            Files.delete_Folder_Recursively(temp_Path_XmlDatabase);
            if (temp_Path_XmlDatabase.folder_Exists())
            {
                "temp_Path_XmlDatabase was not not deleted ok".assert_Ignore();
            }

            temp_Path_XmlDatabase.assert_Folder_Not_Exists();
        }
Пример #6
0
 [TestFixtureTearDown] public void testFixtureTearDown()
 {
     nunitTests_Cassini.stop();
 }