[Test] public void getActive_UserData_Repo_Remote_GitPath() { var tmServer = new TM_Server(); var userData_Config = new TM_Server.Config { Name = 10.randomLetters(), Remote_GitPath = 10.randomLetters() }; tmServer.add_UserData(userData_Config); tmServer.active_UserData(userData_Config); var active_GitConfig = tmServer.userData_Config(); var remote_GitPath = tmServer.userData_Config().Remote_GitPath; Assert.NotNull(active_GitConfig); Assert.AreEqual(userData_Config, active_GitConfig); Assert.AreEqual(userData_Config.Remote_GitPath, remote_GitPath);; }
[Test] public void setDefaultData() { var tmServer = new TM_Server(); tmServer.setDefaultData(); Assert.IsNotEmpty(tmServer.UserData_Configs); Assert.IsNotEmpty(tmServer.SiteData_Configs); Assert.AreEqual(1, tmServer.UserData_Configs.size()); Assert.AreEqual(1, tmServer.SiteData_Configs.size()); var userData = tmServer.userData_Config(); Assert.AreEqual(userData.Name, TMConsts.TM_SERVER_DEFAULT_NAME_USERDATA); Assert.AreEqual(userData.Active, true); // Assert.AreEqual(userData.Use_FileSystem , false); // Assert.AreEqual(userData.Enable_Git_Support , false); var siteData = tmServer.siteData_Config(); Assert.AreEqual(siteData.Name, TMConsts.TM_SERVER_DEFAULT_NAME_SITEDATA); Assert.AreEqual(siteData.Active, true); // Assert.AreEqual(siteData.Use_FileSystem , false); // Assert.AreEqual(siteData.Enable_Git_Support , false); }