[Test] public void TM_UserData_Git_Ctor() { var userDataGit = new TM_UserData_Git(null); Assert.AreEqual(userDataGit.NGit_Author_Name, TMConsts.NGIT_DEFAULT_AUTHOR_NAME); Assert.AreEqual(userDataGit.NGit_Author_Email, TMConsts.NGIT_DEFAULT_AUTHOR_EMAIL); }
[SetUp][Admin] public void setUp() { UserGroup.Admin.assert(); //create TM_FileStorage on temp Custom_WebRoot for this TestFixture TM_FileStorage.Custom_WebRoot = "custom_WebRoot".tempDir(); tmFileStorage = new TM_FileStorage(false); tmFileStorage.set_WebRoot() .set_Path_XmlDatabase() .tmServer_Load() .set_Path_UserData() .load_UserData(); tmFileStorage.hook_Events_TM_UserData(); tmXmlDatabase = tmFileStorage.TMXmlDatabase.assert_Not_Null(); userData = tmFileStorage.UserData.assert_Not_Null(); tmServer = tmFileStorage.Server.assert_Not_Null(); tmFileStorage.Path_XmlDatabase.assert_Folder_Exists(); tmFileStorage.Path_UserData.assert_Folder_Exists(); userDataGit = tmFileStorage.setup_UserData_Git_Support(); // adds Git Support for UserData repos tmFileStorage.Path_UserData.isGitRepository().assert_True(); Assert.NotNull(tmFileStorage.Server.userData_Config()); userData.createDefaultAdminUser(); userDataGit.triggerGitCommit(); nGit = userDataGit.NGit; nGit.commits().assert_Size_Is(2, "there should be two commits here"); UserGroup.None.assert(); }