public void setUp()
        {
            //create temp repo with no Admin user
            userData = new TM_UserData(true)
            {
                Path_UserData = "nonGitRepo".tempDir()
            };
            userData.SetUp();
            nGit = userData.NGit;

            Assert.AreEqual(2, nGit.commits().size(), "there should be two commits here");
        }
Exemple #2
0
        public void setUp()
        {
            //create temp repo with no Admin user
            userData = new TM_UserData(true)
            {
                Path_UserData = "nonGitRepo".tempDir()
            };
            userData.SetUp();
            nGit = userData.NGit;

            Assert.AreEqual(1, nGit.commits().size(), "there should be one commit of the TMSecretData.config file");
        }
Exemple #3
0
        public void CheckNonGitRepoDoesntCommit()
        {
            userData.Path_UserData = "nonGitRepo".tempDir();
            userData.AutoGitCommit = false;

            Assert.IsTrue(userData.UsingFileStorage);
            Assert.IsTrue(userData.Path_UserData.dirExists());
            Assert.IsEmpty(userData.Path_UserData.files());

            userData.SetUp()
            .newUser();

            var users = userData.tmUsers();

            Assert.IsNotEmpty(users, "There should be at least one user (the admin)");
            Assert.IsNotEmpty(userData.Path_UserData.files());
            Assert.AreEqual(3, userData.Path_UserData.files().size());
            Assert.IsFalse(userData.Path_UserData.isGitRepository());
        }