Inheritance: ProviderBase
コード例 #1
0
            public void ReturnsNullProjectUrl()
            {
                var provider = new CustomUrlProvider();
                provider.Initialize(correctUrl);

                Assert.IsNull(provider.ProjectUrl);
            }
コード例 #2
0
            public void ReturnsNullCompany()
            {
                var provider = new CustomUrlProvider();
                provider.Initialize(correctUrl);

                Assert.IsNull(provider.CompanyName);
            }
コード例 #3
0
            public void ReturnsValidRawGitUrl()
            {
                var provider = new CustomUrlProvider();
                provider.Initialize(correctUrl);

                string correctReturnedUrl = correctUrl.Replace("{filename}", "%var2%");
                correctReturnedUrl = correctReturnedUrl.Replace("{revision}", "{0}");

                Assert.AreEqual(correctReturnedUrl, provider.RawGitUrl);
            }
コード例 #4
0
            public void CorrectlyValidatesForUrls(string url, bool expectedValue)
            {
                var provider = new CustomUrlProvider();
                var valid = provider.Initialize(url);

                Assert.AreEqual(expectedValue, valid);
            }