diff --git a/.gitignore b/.gitignore index 5ac86e6..2191290 100644 --- a/.gitignore +++ b/.gitignore @@ -150,5 +150,5 @@ $RECYCLE.BIN/ #Ignore settings -csharp-github-api.IntegrationTests.dll.config +GitHubAPI.IntegrationTests.dll.config App.config diff --git a/GitHubAPI.Net.sln b/GitHubAPI.Net.sln index 099f6b9..5ea269b 100644 --- a/GitHubAPI.Net.sln +++ b/GitHubAPI.Net.sln @@ -1,9 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Express 2012 for Web +# Visual Studio 2012 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHubAPI", "csharp-github-api\GitHubAPI.csproj", "{AC8795CC-BDFF-4D37-85EE-E17A7D5A8A59}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHubAPI.Tests.NUnit", "csharp-github-api.Tests\GitHubAPI.Tests.NUnit.csproj", "{16450E56-7802-4E7B-9F01-6A4824175B15}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHubAPI.Tests", "csharp-github-api.Tests\GitHubAPI.Tests.csproj", "{16450E56-7802-4E7B-9F01-6A4824175B15}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GitHubAPI.IntegrationTests", "csharp-github-api.IntegrationTests\GitHubAPI.IntegrationTests.csproj", "{77E78A72-17B3-436F-8F26-B2910F3101DE}" EndProject diff --git a/csharp-github-api.IntegrationTests/Authentication/BasicAuthenticationTest.cs b/csharp-github-api.IntegrationTests/Authentication/BasicAuthenticationTest.cs index 402bfb4..d60350d 100644 --- a/csharp-github-api.IntegrationTests/Authentication/BasicAuthenticationTest.cs +++ b/csharp-github-api.IntegrationTests/Authentication/BasicAuthenticationTest.cs @@ -1,21 +1,10 @@ -#if NUNIT -using NUnit.Framework; -#else -using TestFixture = Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute; -using Test = Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute; -using TestFixtureSetUp = Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute; -using SetUp = Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute; -using Microsoft.VisualStudio.TestTools.UnitTesting; -#endif - - -using System.Configuration; +namespace GitHubAPI.IntegrationTests.Authentication +{ + using NUnit.Framework; + using System.Configuration; -using RestSharp; -using StructureMap; + using RestSharp; -namespace GitHubAPI.IntegrationTests.Authentication -{ [TestFixture] public class BasicAuthenticationTest { @@ -47,7 +36,7 @@ public void MakeAuthenticatedRequest() var response = client.Execute(_restRequest); - NUnit.Framework.Assert.That(response.Content, NUnit.Framework.Is.StringContaining("total_private_repos")); + Assert.That(response.Content, Is.StringContaining("total_private_repos")); } } } diff --git a/csharp-github-api.IntegrationTests/Ext/TinySpec.cs b/csharp-github-api.IntegrationTests/Ext/TinySpec.cs index 667ea4f..bfbeda3 100644 --- a/csharp-github-api.IntegrationTests/Ext/TinySpec.cs +++ b/csharp-github-api.IntegrationTests/Ext/TinySpec.cs @@ -16,17 +16,7 @@ // specific language governing permissions and limitations under the License. // ============================================================================== -#if NUNIT using NUnit.Framework; -#else -using TestFixture = Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute; -using Test = Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute; -using TestFixtureSetUp = Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute; -using TestFixtureTearDown = Microsoft.VisualStudio.TestTools.UnitTesting.TestCleanupAttribute; -using SetUp = Microsoft.VisualStudio.TestTools.UnitTesting.TestInitializeAttribute; -using Microsoft.VisualStudio.TestTools.UnitTesting; -#endif - using System; namespace GitHubAPI.IntegrationTests.Ext @@ -55,9 +45,8 @@ public void TearDown() public virtual void AfterObservations() {} } - //Note: Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute which is what ths should inherit from in VS testing is sealeds - public class ObservationAttribute : NUnit.Framework.TestAttribute {} - public class FactAttribute : NUnit.Framework.TestAttribute { } + public class ObservationAttribute : TestAttribute {} + public class FactAttribute : TestAttribute { } public class ConcernForAttribute : Attribute { diff --git a/csharp-github-api.IntegrationTests/GitHubAPI.IntegrationTests.csproj b/csharp-github-api.IntegrationTests/GitHubAPI.IntegrationTests.csproj index 617fac2..d6f5624 100644 --- a/csharp-github-api.IntegrationTests/GitHubAPI.IntegrationTests.csproj +++ b/csharp-github-api.IntegrationTests/GitHubAPI.IntegrationTests.csproj @@ -51,7 +51,6 @@ ..\packages\log4net.1.2.10\lib\2.0\log4net.dll - ..\packages\NUnit.2.6.2\lib\nunit.framework.dll @@ -113,14 +112,12 @@ ResXFileCodeGenerator TestResources.Designer.cs - - - + copy $(ProjectDir)GitHubAPI.IntegrationTests.dll.config $(ProjectDir)$(OutDir)