From 6854a20aaab79579945ca16d033ad8dfc2be0ce4 Mon Sep 17 00:00:00 2001 From: Darren Cauthon Date: Sat, 12 Mar 2016 20:31:20 -0600 Subject: [PATCH 01/16] Add nunit test runner. --- src/SparkPost.Tests/packages.config | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SparkPost.Tests/packages.config b/src/SparkPost.Tests/packages.config index 5d2ecf5c..110b3ba8 100644 --- a/src/SparkPost.Tests/packages.config +++ b/src/SparkPost.Tests/packages.config @@ -4,6 +4,7 @@ + \ No newline at end of file From 54ff52596aec49a2c5612ec5406b2c595e2400a3 Mon Sep 17 00:00:00 2001 From: Darren Cauthon Date: Sat, 12 Mar 2016 20:37:52 -0600 Subject: [PATCH 02/16] Add a travis.yml file. --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..8fea4333 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +language: csharp +solution: src/SparkPost.sln +install: + - nuget restore src/SparkPost.sln + - nuget install NUnit.Runners - Version 2.6.4 -OutputDirectory testrunner +script: + - xbuild p/:Configuration=Release src/SparkPost.sln + - mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe src/SparkPost.Tests/bin/Release/SparkPost.Tests.dll From cdde36b69b277edd504df74814ee8da0eb4150e1 Mon Sep 17 00:00:00 2001 From: Darren Cauthon Date: Sat, 12 Mar 2016 21:27:10 -0600 Subject: [PATCH 03/16] Typo. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8fea4333..093b2af0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: csharp solution: src/SparkPost.sln install: - nuget restore src/SparkPost.sln - - nuget install NUnit.Runners - Version 2.6.4 -OutputDirectory testrunner + - nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory testrunner script: - xbuild p/:Configuration=Release src/SparkPost.sln - mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe src/SparkPost.Tests/bin/Release/SparkPost.Tests.dll From c102caafd98b2706bc8a231a64a48d9ea0178494 Mon Sep 17 00:00:00 2001 From: Darren Cauthon Date: Sat, 12 Mar 2016 21:30:36 -0600 Subject: [PATCH 04/16] Better match the example. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 093b2af0..90c2f5fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,4 +5,4 @@ install: - nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory testrunner script: - xbuild p/:Configuration=Release src/SparkPost.sln - - mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe src/SparkPost.Tests/bin/Release/SparkPost.Tests.dll + - mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe ./SparkPost.Tests/bin/Release/SparkPost.Tests.dll From c80b2a4cc9d6da2db1dad8882f0df1f8f2f73cfa Mon Sep 17 00:00:00 2001 From: Darren Cauthon Date: Sun, 13 Mar 2016 06:55:39 -0500 Subject: [PATCH 05/16] Use the debug version. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 90c2f5fd..cf2126f6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,5 +4,5 @@ install: - nuget restore src/SparkPost.sln - nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory testrunner script: - - xbuild p/:Configuration=Release src/SparkPost.sln - - mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe ./SparkPost.Tests/bin/Release/SparkPost.Tests.dll + - xbuild p/:Configuration=Debug src/SparkPost.sln + - mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe ./SparkPost.Tests/bin/Debug/SparkPost.Tests.dll From 91975c8a814172717f94e9e75bff01ea43c3fcfd Mon Sep 17 00:00:00 2001 From: Darren Cauthon Date: Sun, 13 Mar 2016 07:02:19 -0500 Subject: [PATCH 06/16] Perhaps this is the correct file location. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cf2126f6..1f97115c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,4 +5,4 @@ install: - nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory testrunner script: - xbuild p/:Configuration=Debug src/SparkPost.sln - - mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe ./SparkPost.Tests/bin/Debug/SparkPost.Tests.dll + - mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe src/SparkPost.Tests/bin/Debug/SparkPost.Tests.dll From 0379055b176e29b08cdfffe3565d3ebfa8a4bd06 Mon Sep 17 00:00:00 2001 From: Darren Cauthon Date: Sun, 13 Mar 2016 07:06:17 -0500 Subject: [PATCH 07/16] Build only the test project. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1f97115c..4ce5460e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,5 +4,5 @@ install: - nuget restore src/SparkPost.sln - nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory testrunner script: - - xbuild p/:Configuration=Debug src/SparkPost.sln + - xbuild p/:Configuration=Debug src/SparkPost.Tests/SparkPost.Tests.csproj - mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe src/SparkPost.Tests/bin/Debug/SparkPost.Tests.dll From a768ea7632c063f4c5b13a0a1ae8cf5c0f644a9e Mon Sep 17 00:00:00 2001 From: Darren Cauthon Date: Sun, 13 Mar 2016 07:10:24 -0500 Subject: [PATCH 08/16] Drop back to 4.5. --- src/SparkPost.Tests/SparkPost.Tests.csproj | 3 ++- src/SparkPost.Tests/packages.config | 2 +- src/SparkPost/SparkPost.csproj | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/SparkPost.Tests/SparkPost.Tests.csproj b/src/SparkPost.Tests/SparkPost.Tests.csproj index bca906df..782b9e47 100644 --- a/src/SparkPost.Tests/SparkPost.Tests.csproj +++ b/src/SparkPost.Tests/SparkPost.Tests.csproj @@ -9,8 +9,9 @@ Properties SparkPost.Tests SparkPost.Tests - v4.5.2 + v4.5 512 + true diff --git a/src/SparkPost.Tests/packages.config b/src/SparkPost.Tests/packages.config index 110b3ba8..2bb98bda 100644 --- a/src/SparkPost.Tests/packages.config +++ b/src/SparkPost.Tests/packages.config @@ -1,6 +1,6 @@  - + diff --git a/src/SparkPost/SparkPost.csproj b/src/SparkPost/SparkPost.csproj index c5f77d35..eaae82b7 100644 --- a/src/SparkPost/SparkPost.csproj +++ b/src/SparkPost/SparkPost.csproj @@ -9,8 +9,9 @@ Properties SparkPost SparkPost - v4.5.2 + v4.5 512 + true From 7a01f69ef076a776bb0b192120b05f82756a89c3 Mon Sep 17 00:00:00 2001 From: Darren Cauthon Date: Sun, 13 Mar 2016 07:17:20 -0500 Subject: [PATCH 09/16] Maybe these bits have better defaults? --- .travis.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4ce5460e..e28afbbe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,2 @@ language: csharp solution: src/SparkPost.sln -install: - - nuget restore src/SparkPost.sln - - nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory testrunner -script: - - xbuild p/:Configuration=Debug src/SparkPost.Tests/SparkPost.Tests.csproj - - mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe src/SparkPost.Tests/bin/Debug/SparkPost.Tests.dll From c1b25108bccb23b03ed5823c93632d6ace1cd1fb Mon Sep 17 00:00:00 2001 From: Darren Cauthon Date: Sun, 13 Mar 2016 07:25:41 -0500 Subject: [PATCH 10/16] Bring back nunit test runners. --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index e28afbbe..e12adb12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,2 +1,5 @@ language: csharp solution: src/SparkPost.sln +-install: + - nuget restore src/SparkPost.sln + - nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory testrunner From 0eb81edddc2fb9b707cfa8be0c8e447fc6d9789f Mon Sep 17 00:00:00 2001 From: Darren Cauthon Date: Sun, 13 Mar 2016 07:35:24 -0500 Subject: [PATCH 11/16] Make sure it will still build. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index e12adb12..efbf3eaf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,3 +3,5 @@ solution: src/SparkPost.sln -install: - nuget restore src/SparkPost.sln - nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory testrunner +-script: + - xbuild /p:Configuration=Release src/SparkPost.sln From 95575cdabe17b787c5ee0b3793a40b8e6f8f49ec Mon Sep 17 00:00:00 2001 From: Darren Cauthon Date: Sun, 13 Mar 2016 07:53:38 -0500 Subject: [PATCH 12/16] Point to the specific dll being built. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index efbf3eaf..a6436fa4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,3 +5,4 @@ solution: src/SparkPost.sln - nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory testrunner -script: - xbuild /p:Configuration=Release src/SparkPost.sln + - mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe /home/travis/build/SparkPost/csharp-sparkpost/src/SparkPost.Tests/bin/Release/SparkPost.Tests.dll From cbb01542253a9e68a4f32b4ba7cee33e90ed7c59 Mon Sep 17 00:00:00 2001 From: Darren Cauthon Date: Mon, 14 Mar 2016 16:59:10 -0500 Subject: [PATCH 13/16] Copy a working setup from another .Net project --- .travis.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a6436fa4..35069b67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,10 @@ language: csharp solution: src/SparkPost.sln --install: +before_install: + - sudo apt-get install nunit-console +-before_script: - nuget restore src/SparkPost.sln - - nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory testrunner -script: - xbuild /p:Configuration=Release src/SparkPost.sln - - mono ./testrunner/NUnit.Runners.2.6.4/tools/nunit-console.exe /home/travis/build/SparkPost/csharp-sparkpost/src/SparkPost.Tests/bin/Release/SparkPost.Tests.dll +-after_script: + - nunit-console /home/travis/build/SparkPost/csharp-sparkpost/src/SparkPost.Tests/bin/Release/SparkPost.Tests.dll From 45f6d25808f9b497bb1de5cbe2e2d1cd3b23c134 Mon Sep 17 00:00:00 2001 From: Darren Cauthon Date: Mon, 14 Mar 2016 17:03:26 -0500 Subject: [PATCH 14/16] No dashes. --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 35069b67..383eadce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,9 @@ language: csharp solution: src/SparkPost.sln before_install: - sudo apt-get install nunit-console --before_script: +before_script: - nuget restore src/SparkPost.sln --script: +script: - xbuild /p:Configuration=Release src/SparkPost.sln --after_script: +after_script: - nunit-console /home/travis/build/SparkPost/csharp-sparkpost/src/SparkPost.Tests/bin/Release/SparkPost.Tests.dll From ca27d3a4ba9c0a19e27710e914cc3aefee9b3099 Mon Sep 17 00:00:00 2001 From: Darren Cauthon Date: Mon, 14 Mar 2016 17:07:10 -0500 Subject: [PATCH 15/16] Run the tests as part of the script. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 383eadce..9ebbb5af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,5 +6,4 @@ before_script: - nuget restore src/SparkPost.sln script: - xbuild /p:Configuration=Release src/SparkPost.sln -after_script: - nunit-console /home/travis/build/SparkPost/csharp-sparkpost/src/SparkPost.Tests/bin/Release/SparkPost.Tests.dll From 13727cf9fd89500891846e5439e9679cacf9eb88 Mon Sep 17 00:00:00 2001 From: Darren Cauthon Date: Mon, 14 Mar 2016 17:13:24 -0500 Subject: [PATCH 16/16] Drop this failing integration test. --- src/SparkPost.Tests/SparkPost.Tests.csproj | 1 - .../TransmissionSenderTests.cs | 40 ------------------- 2 files changed, 41 deletions(-) delete mode 100644 src/SparkPost.Tests/TransmissionSenderTests.cs diff --git a/src/SparkPost.Tests/SparkPost.Tests.csproj b/src/SparkPost.Tests/SparkPost.Tests.csproj index 782b9e47..99da3715 100644 --- a/src/SparkPost.Tests/SparkPost.Tests.csproj +++ b/src/SparkPost.Tests/SparkPost.Tests.csproj @@ -83,7 +83,6 @@ - diff --git a/src/SparkPost.Tests/TransmissionSenderTests.cs b/src/SparkPost.Tests/TransmissionSenderTests.cs deleted file mode 100644 index 851d576e..00000000 --- a/src/SparkPost.Tests/TransmissionSenderTests.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using NUnit.Framework; - -namespace SparkPost.Tests -{ - - [TestFixture] - public class TransmissionsTests - { - private string apiKey; - private string apiHost; - private Client client; - - [SetUp] - public void Setup() - { - apiKey = Guid.NewGuid().ToString(); - client = new Client(apiKey); - } - - [Test] - public void It_should_be_able_to_send_an_email() - { - var transmission = new Transmission - { - Content = - { - From = new Address {Email = "testing@sparkpostbox.com"}, - TemplateId = "my-first-email" - } - }; - - transmission.Recipients.Add(new Recipient {Address = new Address {Email = "darren@cauthon.com"}}); - - var result = client.Transmissions.Send(transmission); - result.Wait(); - } - } - -} \ No newline at end of file