public void Call_Pages_From_TM_Started_With_Temp_Path_XmlDatabase() { var nUnitTests_Cassini = new NUnitTests_Cassini_TeamMentor(); nUnitTests_Cassini.start (makeTcpRequestToPort : false) .use_Temp_Path_XmlDatabase (); var homePageUrl = nUnitTests_Cassini.apiCassini.url(); //try via direct Http requests homePageUrl.append("") .GET().assert_Not_Contains("Login"); homePageUrl.append("TBot").GET().assert_Contains ("Login"); //try via browser requests var ie = "Call_Pages_From_TM_Started_With_Temp_Path_XmlDatabase".add_IE_Hidden_PopupWindow(); ie.open(homePageUrl) .assert_Has_Links("About", "Login", "Help"); ie.open(homePageUrl ).waitForLink("About");ie.assert_Url_Is(homePageUrl.append("teamMentor")); ie.open(homePageUrl.append("Tbot")).assert_Url_Is(homePageUrl.append("Html_Pages/Gui/Pages/login.html?LoginReferer=/tbot")); ie.parentForm().Close(); nUnitTests_Cassini.stop_And_Delete_Temp_XmlDatabase(); }
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(); }
public void NUnitTests_Cassini_TeamMentor_Ctor() { // Checks that the Ctor doesn't start the server var nUnitTests_TeamMentor = new NUnitTests_Cassini_TeamMentor(); nUnitTests_TeamMentor.apiCassini.assert_Null(); nUnitTests_TeamMentor.webRoot .assert_Folder_Not_Exists(); nUnitTests_TeamMentor.port .assert_Default(); }
public void teamMentor_Root_OnDisk() { var nUnitTests_Cassini = new NUnitTests_Cassini_TeamMentor(); var teamMentor_Root_OnDisk = nUnitTests_Cassini.teamMentor_Root_OnDisk(); teamMentor_Root_OnDisk.assert_Folder_Exists() .assert_Folder_Has_Files("web.config", "default.htm" , "javascript/TM/settings.js" , "javascript/gAnalytics/ga.js"); }
public void teamMentor_Objects_Proxy() { var nUnitTests_Cassini = new NUnitTests_Cassini_TeamMentor(); var apiCassini = new API_Cassini(); nUnitTests_Cassini.apiCassini = apiCassini; nUnitTests_Cassini.teamMentor_Objects_Proxy().assert_Not_Null() .apiCassini.assert_Is(apiCassini); }
public void new_IE_TeamMentor() { var nUnitTests_Cassini = new NUnitTests_Cassini_TeamMentor().start(); var ieTeamMentor = nUnitTests_Cassini.new_IE_TeamMentor(); var expected_TBot_Url = ieTeamMentor.siteUri.append("Html_Pages/Gui/Pages/login.html?LoginReferer=/tbot").str(); ieTeamMentor.page_TBot(); ieTeamMentor.ie.url().assert_Is(expected_TBot_Url); ieTeamMentor.close(); }
public void Show_REPL_For_Cassini_And_IE__Runnnig_TeamMentor() { var nUnitTests_Cassini = new NUnitTests_Cassini_TeamMentor().start(); var script = nUnitTests_Cassini.script_IE(); script.parentForm() .set_H2Icon() .waitForClose(); }
public void testFixtureSetUp() { nUnitTests_Cassini = new NUnitTests_Cassini_TeamMentor().start(); tmProxy = nUnitTests_Cassini.tmProxy(); ieTeamMentor = nUnitTests_Cassini.new_IE_TeamMentor(true); ie = ieTeamMentor.ie; nUnitTests_Cassini.siteUri.GET().assert_Contains("TeamMentor"); // make a request to trigger Asp.NET pipeline and TM Startup tmProxy.map_ReferencesToTmObjects(); // these should be alive after startup tmConfig = tmProxy.TmConfig .assert_Not_Null(); // specially the TMConfig object }
public void call_TM_StartUp_Application_Start() { var nUnitTests_Cassini = new NUnitTests_Cassini_TeamMentor(); nUnitTests_Cassini.start (makeTcpRequestToPort : false) .use_Temp_Path_XmlDatabase () .call_TM_StartUp_Application_Start(); nUnitTests_Cassini.tmProxy ().get_Current<TM_FileStorage>().assert_Not_Null(); nUnitTests_Cassini.tmFileStorage() .assert_Not_Null() .Path_XmlDatabase.assert_Equals(nUnitTests_Cassini.tmProxy().get_Custom_Path_XmlDatabase()); nUnitTests_Cassini.delete_Temp_Path_XmlDatabase(); }
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(); }
public void Check_That_New_UserData_Is_Git_REPO() { var nUnitTests_Cassini = new NUnitTests_Cassini_TeamMentor(); nUnitTests_Cassini.start(true); nUnitTests_Cassini.siteUri.GET().assert_Contains("TeamMentor"); var tmProxy = nUnitTests_Cassini.tmProxy_Refresh() .tmProxy; tmProxy.TmServer.assert_Not_Null() .Git.UserData_Git_Enabled.assert_True(); tmProxy.TmFileStorage.path_UserData() .isGitRepository().assert_Is_True(); ////tmProxy.TmFileStorage.tmServer_Location().assert_Is("ad"); }
public void Start_TM_Using_TM_StartUp_Application_Start() { var nUnitTests_Cassini = new NUnitTests_Cassini_TeamMentor().start(makeTcpRequestToPort : false); nUnitTests_Cassini.use_Temp_Path_XmlDatabase(); var tmProxy = nUnitTests_Cassini.tmProxy(); tmProxy.map_ReferencesToTmObjects().TmFileStorage.assert_Null(); // before call to tmStartUp.Application_Start() should not be set TmFileStorage tmProxy.invoke_Instance(typeof(TM_StartUp), "get_Version").assert_Not_Null(); // this will call the TM_StartUp .ctor() var tmStartUp = tmProxy.get_Current<TM_StartUp>() .assert_Not_Null(); // get byRef object of TM_StartUp tmStartUp.Application_Start(); // after this completes we should have a full TM loaded tmProxy.map_ReferencesToTmObjects(); // which means that after remapping the TM object references tmProxy.TmConfig .assert_Not_Null(); // we have native access to the main TM objects :) tmProxy.TmFileStorage .assert_Not_Null(); tmProxy.TmServer .assert_Not_Null(); tmProxy.TmStatus .assert_Not_Null(); tmProxy.TmUserData .assert_Not_Null(); tmProxy.TmXmlDatabase .assert_Not_Null(); tmProxy.TmConfig.assert_Not_Null(); nUnitTests_Cassini.delete_Temp_Path_XmlDatabase(); }
public void testFixtureSetUp() { nunitTests_Cassini = new NUnitTests_Cassini_TeamMentor(); nunitTests_Cassini.start(); tmProxy = nunitTests_Cassini.teamMentor_Objects_Proxy(); }
public static NUnitTests_Cassini_TeamMentor script_IE_WaitForClose(this NUnitTests_Cassini_TeamMentor nUnitTests_Cassini) { nUnitTests_Cassini.script_IE().parentForm().waitForClose(); return(nUnitTests_Cassini); }
public static TM_Proxy tmProxy(this NUnitTests_Cassini_TeamMentor nUnitTests_Cassini) { return(nUnitTests_Cassini.teamMentor_Objects_Proxy()); }
public static NUnitTests_Cassini_TeamMentor call_TM_StartUp_Application_Start(this NUnitTests_Cassini_TeamMentor nUnitTests_Cassini) { var tmProxy = nUnitTests_Cassini.tmProxy(); tmProxy.invoke_Instance(typeof(TM_StartUp), "get_Version").assert_Not_Null(); // this will call the TM_StartUp .ctor() var tmStartUp = tmProxy.get_Current <TM_StartUp>().assert_Not_Null(); // get byRef object of TM_StartUp tmStartUp.Application_Start(); tmProxy.get_Current <TM_FileStorage>().assert_Not_Null(); return(nUnitTests_Cassini); }