Exemplo n.º 1
0
 public RegisteredUsers(GitLabWrapper gitLabWrapper, DXVcsWrapper vcsWrapper)
 {
     this.gitLabWrapper = gitLabWrapper;
     ADUsers            = ADWrapper.GetUsers().ToDictionary(x => x.UserName, new UserNameEqualityComparer());
     Users         = CreateGitLabUsers().ToDictionary(x => x.UserName, new UserNameEqualityComparer());
     this.VcsUsers = vcsWrapper.GetUsers().ToList();
 }
Exemplo n.º 2
0
 public BranchViewModel(GitLabWrapper gitLabWrapper, RepositoryViewModel repository, string branch)
 {
     this.gitLabWrapper = gitLabWrapper;
     Repository         = repository;
     Name = branch;
     ForceBuildCommand = DelegateCommandFactory.Create(ForceBuild, CanForceBuild);
 }
Exemplo n.º 3
0
        public void GetProject()
        {
            GitLabWrapper wrapper = new GitLabWrapper(TestCredentials.GitServer, TestCredentials.GitLabToken);
            var           project = wrapper.FindProject("tester/testxpfall");

            Assert.IsNotNull(project);
        }
Exemplo n.º 4
0
 public void RegisterUser()
 {
     GitLabWrapper   gitLabWrapper = new GitLabWrapper(TestCredentials.GitServer, TestCredentials.GitLabToken);
     DXVcsWrapper    vcsWrapper    = new DXVcsWrapper(TestCredentials.VcsServer);
     RegisteredUsers users         = new RegisteredUsers(gitLabWrapper, vcsWrapper);
     var             user          = users.GetUser("Barakhov");
 }
Exemplo n.º 5
0
        public void SearchGitLabUser()
        {
            GitLabWrapper wrapper = new GitLabWrapper(TestCredentials.GitServer, TestCredentials.GitLabToken);
            var           dict    = wrapper.GetUsers().ToDictionary(x => x.Username);
            var           user    = dict["Litvinov"];

            Assert.IsNotNull(user.Email);
        }
Exemplo n.º 6
0
 public RepositoryViewModel(string name, TrackRepository trackRepository, RepositoriesViewModel repositories)
 {
     TrackRepository    = trackRepository;
     GitLabWrapper      = new GitLabWrapper(TrackRepository.Server, TrackRepository.Token);
     HasAdminPrivileges = GitLabWrapper.IsAdmin();
     GitReader          = new GitReaderWrapper(trackRepository.LocalPath);
     UpdateConfigs(trackRepository, repositories);
     Repositories = repositories;
     Origin       = GitLabWrapper.FindProject(GitReader.GetOriginRepoPath());
     Upstream     = GitLabWrapper.FindProject(GitReader.GetUpstreamRepoPath());
     Name         = name;
     Update();
 }
Exemplo n.º 7
0
        public void SearchRegisteredUser()
        {
            GitLabWrapper   gitLabWrapper = new GitLabWrapper(TestCredentials.GitServer, TestCredentials.GitLabToken);
            DXVcsWrapper    vcsWrapper    = new DXVcsWrapper(TestCredentials.VcsServer);
            RegisteredUsers users         = new RegisteredUsers(gitLabWrapper, vcsWrapper);

            var user = users.GetUser("litvinov");

            Assert.IsNotNull(user);
            Assert.IsTrue(user.IsRegistered);

            var user2 = users.GetUser("Litvinov");

            Assert.IsNotNull(user2);
            Assert.IsTrue(user2.IsRegistered);
        }
Exemplo n.º 8
0
 public MergeRequest CreateMergeRequest(string title, string description, string user, string sourceBranch, string targetBranch)
 {
     return(GitLabWrapper.CreateMergeRequest(Origin, Upstream, title, description, user, sourceBranch, targetBranch));
 }
Exemplo n.º 9
0
 public void GetMergeRequests()
 {
     GitLabWrapper wrapper  = new GitLabWrapper(TestCredentials.GitServer, TestCredentials.GitLabToken);
     var           project  = wrapper.FindProject("tester/testxpfall");
     var           requests = wrapper.GetMergeRequests(project, x => x.TargetBranch == "test2");
 }