示例#1
0
            public void ReturnsInValidInitialization()
            {
                var provider = new VisualStudioTeamServicesProvider();
                var valid    = provider.Initialize("https://github.com/CatenaLogic/GitLink");

                Assert.IsFalse(valid);
            }
示例#2
0
            public void ReturnsValidInitialization()
            {
                var provider = new VisualStudioTeamServicesProvider();
                var valid    = provider.Initialize("https://my-account.visualstudio.com/_git/main-repo");

                Assert.IsTrue(valid);
            }
示例#3
0
                public void ReturnsValidRepositoryNameWhenContainsPeriod()
                {
                    var provider = new VisualStudioTeamServicesProvider();

                    provider.Initialize("https://CatenaLogic.visualstudio.com/Big.Project/_git/main.repo");

                    Assert.AreEqual("main.repo", provider.ProjectUrl);
                }
示例#4
0
                public void ReturnsValidProject2()
                {
                    var provider = new VisualStudioTeamServicesProvider();

                    provider.Initialize("https://CatenaLogic.visualstudio.com/BigProject/_git/main-repo");

                    Assert.AreEqual("BigProject", provider.ProjectName);
                }
示例#5
0
                public void ReturnsValidCompanyUrl()
                {
                    var provider = new VisualStudioTeamServicesProvider();

                    provider.Initialize("https://CatenaLogic.visualstudio.com/_git/main-repo");

                    Assert.AreEqual("https://CatenaLogic.visualstudio.com/", provider.CompanyUrl);
                }
                public void ReturnsValidCompanyUrl(string url, string expectedCompanyUrl)
                {
                    var provider = new VisualStudioTeamServicesProvider();

                    provider.Initialize(url);

                    Assert.AreEqual(expectedCompanyUrl, provider.CompanyUrl);
                }
                public void ReturnsValidRepositoryName(string url, string expectedProjectUrl)
                {
                    var provider = new VisualStudioTeamServicesProvider();

                    provider.Initialize(url);

                    Assert.AreEqual(expectedProjectUrl, provider.ProjectUrl);
                }
示例#8
0
                public void ReturnsValidCompanyUrlWhenContainsPeriod()
                {
                    var provider = new VisualStudioTeamServicesProvider();

                    provider.Initialize("https://Catena.Logic.visualstudio.com/BigProject/_git/main-repo");

                    Assert.AreEqual("https://Catena.Logic.visualstudio.com/BigProject/", provider.ProjectUrl);
                }