Beispiel #1
0
        public void ShouldCommitChanges()
        {
            var filePath = Path.Combine(TempPath, "DelMe", "Web.config");

            var content = File.ReadAllBytes(filePath);

            _target.Commit(TempPath, "DelMe", "Halo", "Web.config", content);
        }
Beispiel #2
0
        public void ShouldUpdateFile()
        {
            const string fileName = "Tests\\1 INPUT DATA VERIFICATION\\9 LDAP Injection\\Ldap.aspx.cs";

            var filePath = Path.Combine(TempPath, fileName);

            var fileContent = File.ReadAllBytes(filePath);

            _target.Commit(TempPath, "master", DateTime.UtcNow.ToString(CultureInfo.InvariantCulture), fileName, fileContent);
        }
Beispiel #3
0
        public void ShouldCommitChages()
        {
            const string folderPath = @"E:\Temp\GitHub\";

            const string fileName = @"E:\Temp\GitHub\ReadMe.txt";

            var filePath = Path.Combine(folderPath, fileName);

            var fileContent = File.ReadAllBytes(filePath);

            _target.Commit(folderPath, TestBranchName, "My great comment", fileName, fileContent);
        }
Beispiel #4
0
        public void ShouldUploadFileToTheFtp()
        {
            const string folderPath = @"E:\Temp\download";

            const string fileName = @"Test.txt";

            var filePath = Path.Combine(folderPath, fileName);

            var fileContent = File.ReadAllBytes(filePath);

            _ftpPlugin.Commit(folderPath, "Folder 2", "halo", fileName, fileContent);
        }
        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);
        }