diff --git a/src/GitLink.Tests/ApprovalTestsConfig.cs b/src/GitLink.Tests/ApprovalTestsConfig.cs index 7967abb..f5d3ac4 100644 --- a/src/GitLink.Tests/ApprovalTestsConfig.cs +++ b/src/GitLink.Tests/ApprovalTestsConfig.cs @@ -1,10 +1,9 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2014 - 2014 CatenaLogic. All rights reserved. +// Copyright (c) 2014 - 2016 CatenaLogic. All rights reserved. // // -------------------------------------------------------------------------------------------------------------------- - using ApprovalTests.Reporters; [assembly: UseReporter(typeof(DiffReporter))] \ No newline at end of file diff --git a/src/GitLink.Tests/GitLink.Tests.csproj b/src/GitLink.Tests/GitLink.Tests.csproj index 7f3e92d..002abcf 100644 --- a/src/GitLink.Tests/GitLink.Tests.csproj +++ b/src/GitLink.Tests/GitLink.Tests.csproj @@ -27,6 +27,9 @@ DEBUG;TRACE prompt 4 + ..\..\bin\Debug\GitLink.Tests\GitLink.Tests.XML + CS1591 + GitLink.Tests.ruleset pdbonly @@ -35,6 +38,9 @@ TRACE prompt 4 + ..\..\bin\Release\GitLink.Tests\GitLink.Tests.XML + CS1591 + GitLink.Tests.ruleset @@ -85,6 +91,10 @@ + + stylecop.json + + diff --git a/src/GitLink.Tests/GitLink.Tests.ruleset b/src/GitLink.Tests/GitLink.Tests.ruleset new file mode 100644 index 0000000..3094758 --- /dev/null +++ b/src/GitLink.Tests/GitLink.Tests.ruleset @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/GitLink.Tests/GlobalInitialization.cs b/src/GitLink.Tests/GlobalInitialization.cs index 96017af..cf0c7c8 100644 --- a/src/GitLink.Tests/GlobalInitialization.cs +++ b/src/GitLink.Tests/GlobalInitialization.cs @@ -1,17 +1,16 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2014 - 2014 CatenaLogic. All rights reserved. +// Copyright (c) 2014 - 2016 CatenaLogic. All rights reserved. // // -------------------------------------------------------------------------------------------------------------------- - using Catel.Logging; using NUnit.Framework; [SetUpFixture] public class GlobalInitialization { - //[SetUp] + ////[SetUp] public static void SetUp() { #if DEBUG diff --git a/src/GitLink.Tests/IntegrationTests/BitBucketIntegration.cs b/src/GitLink.Tests/IntegrationTests/BitBucketIntegration.cs index 3e9cbd7..abc12a8 100644 --- a/src/GitLink.Tests/IntegrationTests/BitBucketIntegration.cs +++ b/src/GitLink.Tests/IntegrationTests/BitBucketIntegration.cs @@ -1,10 +1,9 @@ // -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2014 - 2014 CatenaLogic. All rights reserved. +// +// Copyright (c) 2014 - 2016 CatenaLogic. All rights reserved. // // -------------------------------------------------------------------------------------------------------------------- - namespace GitLink.Tests.IntegrationTests { using NUnit.Framework; diff --git a/src/GitLink.Tests/IntegrationTests/GitHubIntegration.cs b/src/GitLink.Tests/IntegrationTests/GitHubIntegration.cs index 2b08cfb..86105c0 100644 --- a/src/GitLink.Tests/IntegrationTests/GitHubIntegration.cs +++ b/src/GitLink.Tests/IntegrationTests/GitHubIntegration.cs @@ -1,10 +1,9 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2014 - 2014 CatenaLogic. All rights reserved. +// Copyright (c) 2014 - 2016 CatenaLogic. All rights reserved. // // -------------------------------------------------------------------------------------------------------------------- - namespace GitLink.Tests.IntegrationTests { using NUnit.Framework; diff --git a/src/GitLink.Tests/IntegrationTests/IntegrationTestBase.cs b/src/GitLink.Tests/IntegrationTests/IntegrationTestBase.cs index de6b421..dedf90c 100644 --- a/src/GitLink.Tests/IntegrationTests/IntegrationTestBase.cs +++ b/src/GitLink.Tests/IntegrationTests/IntegrationTestBase.cs @@ -1,10 +1,9 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2014 - 2014 CatenaLogic. All rights reserved. +// Copyright (c) 2014 - 2016 CatenaLogic. All rights reserved. // // -------------------------------------------------------------------------------------------------------------------- - namespace GitLink.Tests.IntegrationTests { using System; diff --git a/src/GitLink.Tests/Properties/AssemblyInfo.cs b/src/GitLink.Tests/Properties/AssemblyInfo.cs index 2add1d8..800d40d 100644 --- a/src/GitLink.Tests/Properties/AssemblyInfo.cs +++ b/src/GitLink.Tests/Properties/AssemblyInfo.cs @@ -1,6 +1,6 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2014 - 2014 CatenaLogic. All rights reserved. +// Copyright (c) 2014 - 2016 CatenaLogic. All rights reserved. // // -------------------------------------------------------------------------------------------------------------------- diff --git a/src/GitLink.Tests/Providers/BitBucketProviderFacts.cs b/src/GitLink.Tests/Providers/BitBucketProviderFacts.cs index 5623278..1f0b85c 100644 --- a/src/GitLink.Tests/Providers/BitBucketProviderFacts.cs +++ b/src/GitLink.Tests/Providers/BitBucketProviderFacts.cs @@ -1,10 +1,9 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2014 - 2014 CatenaLogic. All rights reserved. +// Copyright (c) 2014 - 2016 CatenaLogic. All rights reserved. // // -------------------------------------------------------------------------------------------------------------------- - namespace GitLink.Tests.Providers { using GitLink.Providers; diff --git a/src/GitLink.Tests/Providers/CustomRawUrlProviderFacts.cs b/src/GitLink.Tests/Providers/CustomRawUrlProviderFacts.cs index 1065e26..d8a5472 100644 --- a/src/GitLink.Tests/Providers/CustomRawUrlProviderFacts.cs +++ b/src/GitLink.Tests/Providers/CustomRawUrlProviderFacts.cs @@ -1,4 +1,10 @@ -namespace GitLink.Tests.Providers +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2014 - 2016 CatenaLogic. All rights reserved. +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace GitLink.Tests.Providers { using GitLink.Providers; using NUnit.Framework; diff --git a/src/GitLink.Tests/Providers/CustomUrlProviderFacts.cs b/src/GitLink.Tests/Providers/CustomUrlProviderFacts.cs index 1c26e06..27060fe 100644 --- a/src/GitLink.Tests/Providers/CustomUrlProviderFacts.cs +++ b/src/GitLink.Tests/Providers/CustomUrlProviderFacts.cs @@ -1,20 +1,25 @@ -namespace GitLink.Tests.Providers +// +// Copyright (c) 2014 - 2016 CatenaLogic. All rights reserved. +// + +namespace GitLink.Tests.Providers { - using GitLink.Providers; - using NUnit.Framework; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; + using GitLink.Providers; + using NUnit.Framework; public class CustomUrlProviderFacts { - private const string correctUrl = "https://bitbucket.intra.company.com/projects/aaa/repos/a/browse/{filename}?at={revision}&raw"; + private const string CorrectUrl = "https://bitbucket.intra.company.com/projects/aaa/repos/a/browse/{filename}?at={revision}&raw"; + [TestFixture] public class TheInitialization { - [TestCase(correctUrl, true)] + [TestCase(CorrectUrl, true)] [TestCase("https://example.com/repo", false)] [TestCase("https://bitbucket.intra.company.com/projects/aaa/repos/a/browse/{filename}?raw", true)] [TestCase("gopher://example.com/repo", false)] @@ -34,7 +39,7 @@ public class TheGitHubProviderProperties public void ReturnsNullCompany() { var provider = new CustomUrlProvider(); - provider.Initialize(correctUrl); + provider.Initialize(CorrectUrl); Assert.IsNull(provider.CompanyName); } @@ -43,7 +48,7 @@ public void ReturnsNullCompany() public void ReturnsNullCompanyUrl() { var provider = new CustomUrlProvider(); - provider.Initialize(correctUrl); + provider.Initialize(CorrectUrl); Assert.IsNull(provider.CompanyUrl); } @@ -52,7 +57,7 @@ public void ReturnsNullCompanyUrl() public void ReturnsNullProject() { var provider = new CustomUrlProvider(); - provider.Initialize(correctUrl); + provider.Initialize(CorrectUrl); Assert.IsNull(provider.ProjectName); } @@ -61,7 +66,7 @@ public void ReturnsNullProject() public void ReturnsNullProjectUrl() { var provider = new CustomUrlProvider(); - provider.Initialize(correctUrl); + provider.Initialize(CorrectUrl); Assert.IsNull(provider.ProjectUrl); } @@ -70,9 +75,9 @@ public void ReturnsNullProjectUrl() public void ReturnsValidRawGitUrl() { var provider = new CustomUrlProvider(); - provider.Initialize(correctUrl); + provider.Initialize(CorrectUrl); - string correctReturnedUrl = correctUrl.Replace("{filename}", "%var2%"); + string correctReturnedUrl = CorrectUrl.Replace("{filename}", "%var2%"); correctReturnedUrl = correctReturnedUrl.Replace("{revision}", "{0}"); Assert.AreEqual(correctReturnedUrl, provider.RawGitUrl); diff --git a/src/GitLink.Tests/Providers/GitHubProviderFacts.cs b/src/GitLink.Tests/Providers/GitHubProviderFacts.cs index 45a9731..14f0df4 100644 --- a/src/GitLink.Tests/Providers/GitHubProviderFacts.cs +++ b/src/GitLink.Tests/Providers/GitHubProviderFacts.cs @@ -1,10 +1,9 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2014 - 2014 CatenaLogic. All rights reserved. +// Copyright (c) 2014 - 2016 CatenaLogic. All rights reserved. // // -------------------------------------------------------------------------------------------------------------------- - namespace GitLink.Tests.Providers { using GitLink.Providers; diff --git a/src/GitLink.Tests/Providers/ProviderManagerFacts.cs b/src/GitLink.Tests/Providers/ProviderManagerFacts.cs index 2670de8..3a20627 100644 --- a/src/GitLink.Tests/Providers/ProviderManagerFacts.cs +++ b/src/GitLink.Tests/Providers/ProviderManagerFacts.cs @@ -1,10 +1,9 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2014 - 2014 CatenaLogic. All rights reserved. +// Copyright (c) 2014 - 2016 CatenaLogic. All rights reserved. // // -------------------------------------------------------------------------------------------------------------------- - namespace GitLink.Tests.Providers { using System;