public void ShouldCommitChangesToTfs()
        {
            const string branch = "$/Mopas/sources/master";

            const string featureBranch = "vuln";

            const string folderPath = @"e:\temp\del_me_now\";

            _target.GetSources(branch, folderPath);

            var branchId = _target.CreateBranch(folderPath, featureBranch, branch).Id;

            var message = DateTime.UtcNow.ToString("F");

            var content = Encoding.UTF8.GetBytes(message);

            _target.Commit(folderPath, branchId, message, "Web.config", content);
        }
        public void ShouldCreateBranchOnSharedFolder()
        {
            const string branchName = "Vulnerability-XSS";

            var result = _target.CreateBranch(null, branchName, @"\Sources\Mopas");

            result.Id.ShouldBeEquivalentTo(branchName);
            result.Name.ShouldBeEquivalentTo(branchName);
        }
Exemplo n.º 3
0
        public void ShouldCreateBranchInGitLab()
        {
            const string branchName = "testBranch";

            var branch = _target.CreateBranch("c:\\e", branchName, "master");

            branch.Should().NotBeNull();

            branch.Name.Should().BeEquivalentTo(branchName);
        }
Exemplo n.º 4
0
        public void ShouldCreateNewBranch()
        {
            const string folderPath = @"E:\Temp\GitHub\";

            var result = _target.CreateBranch(folderPath, TestBranchName, "master");

            result.Should().NotBeNull();
            result.Id.Should().BeEquivalentTo(TestBranchName);
            result.Name.Should().BeEquivalentTo(TestBranchName);
        }
Exemplo n.º 5
0
        public void ShouldCreateBranchInGitLab()
        {
            var branches = _target.GetBranches();

            var testBranch = branches.Single(_ => _.Name == "master");

            _target.GetSources(testBranch.Id, TempPath);

            var result = _target.CreateBranch(TempPath, "DelMe", testBranch.Id);

            result.Should().NotBeNull();
        }
Exemplo n.º 6
0
        public void ShouldCreateFtpFolder()
        {
            const string rootFolder = "Folder 2";
            const string newFolder  = "DelMeNow";

            string newFolderPath = $"{rootFolder}/{newFolder}";

            var folderInfo = _ftpPlugin.CreateBranch("e:\\temp\\download\\", newFolder, rootFolder);

            folderInfo.Should().NotBeNull();
            folderInfo.Id.ShouldBeEquivalentTo(newFolderPath);
            folderInfo.IsDefault = false;
            folderInfo.Name.ShouldBeEquivalentTo(newFolderPath);
        }