diff --git a/Mandrill.net.sln b/Mandrill.net.sln
index 07e5e25..abf0903 100644
--- a/Mandrill.net.sln
+++ b/Mandrill.net.sln
@@ -1,14 +1,11 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26228.4
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.7.34302.85
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{3D7BA565-AE66-447A-AF77-81106169A83A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A359CB29-3E2A-4A41-A897-725C5A0888C6}"
- ProjectSection(SolutionItems) = preProject
- .travis.yml = .travis.yml
- appveyor.yml = appveyor.yml
- EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{EF1B7483-88D5-4E7B-A194-E7375C9E1227}"
EndProject
@@ -16,7 +13,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "tests\Tests.csproj
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mandrill.net", "src\Mandrill.net\Mandrill.net.csproj", "{29C93DA7-379F-40CA-9BF3-0F6AA006E28E}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mandrill.net.Extensions.DependencyInjection", "src\Mandrill.net.Extensions.DependencyInjection\Mandrill.net.Extensions.DependencyInjection.csproj", "{2D86B07D-408A-4239-AEB7-143DA31362BC}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mandrill.net.Extensions.DependencyInjection", "src\Mandrill.net.Extensions.DependencyInjection\Mandrill.net.Extensions.DependencyInjection.csproj", "{2D86B07D-408A-4239-AEB7-143DA31362BC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/src/Mandrill.net/Mandrill.net.csproj b/src/Mandrill.net/Mandrill.net.csproj
index 84738e8..e293fda 100644
--- a/src/Mandrill.net/Mandrill.net.csproj
+++ b/src/Mandrill.net/Mandrill.net.csproj
@@ -1,7 +1,7 @@
- 8.2.0
+ 8.3.0
@@ -29,13 +29,6 @@
-
-
-
-
-
-
-
-
+
diff --git a/src/Mandrill.net/Model/Messages/MandrillAttachment.cs b/src/Mandrill.net/Model/Messages/MandrillAttachment.cs
index d928ffe..dd2221c 100644
--- a/src/Mandrill.net/Model/Messages/MandrillAttachment.cs
+++ b/src/Mandrill.net/Model/Messages/MandrillAttachment.cs
@@ -6,9 +6,9 @@ public class MandrillAttachment
{
public MandrillAttachment()
{
-
+
}
-
+
public MandrillAttachment(string type, string name, byte[] content)
{
Type = type;
diff --git a/src/Mandrill.net/Model/Messages/MandrillAttachmentType.cs b/src/Mandrill.net/Model/Messages/MandrillAttachmentType.cs
index 4fa54ad..14a7dd8 100644
--- a/src/Mandrill.net/Model/Messages/MandrillAttachmentType.cs
+++ b/src/Mandrill.net/Model/Messages/MandrillAttachmentType.cs
@@ -42,7 +42,7 @@ public enum MandrillAttachmentType
public class MandrillAttachmentMime
{
public static string GetMimeType(MandrillAttachmentType mime) => _mimeTypes[mime.ToString()];
- static Dictionary _mimeTypes = new Dictionary{
+ static Dictionary _mimeTypes = new Dictionary{
{ "Jpg", "image/jpeg" },
{ "Jpeg", "image/jpeg" },
{ "Png", "image/png" },
@@ -73,6 +73,6 @@ public class MandrillAttachmentMime
{ "Mp4", "video/mp4" },
{ "Avi", "video/x-msvideo" }
};
-
+
}
}
diff --git a/tests/AttachMimeTypes.cs b/tests/AttachMimeTypes.cs
index 79187d0..129a626 100644
--- a/tests/AttachMimeTypes.cs
+++ b/tests/AttachMimeTypes.cs
@@ -12,7 +12,7 @@ namespace Tests
{
[Trait("Category", "AttachMimeTypes")]
[Collection("AttachMimeTypes")]
- public class AttachMimeTypes
+ public class AttachMimeTypes
{
[Fact]
public void AreAllEnumValuesPresent_ShouldReturnTrueWhenAllValuesPresent()
@@ -20,12 +20,12 @@ public void AreAllEnumValuesPresent_ShouldReturnTrueWhenAllValuesPresent()
foreach (MandrillAttachmentType myType in Enum.GetValues(typeof(MandrillAttachmentType)))
{
try
- {
- MandrillAttachmentMime.GetMimeType(myType);
+ {
+ MandrillAttachmentMime.GetMimeType(myType);
}
catch (Exception ex)
{
- Assert.True(false, $"{myType} is not in MandrillAttachmentMime dictionary");
+ Assert.Fail($"{myType} is not in MandrillAttachmentMime dictionary");
}
}
Assert.True(true);
diff --git a/tests/IntegrationTest.cs b/tests/IntegrationTest.cs
index d3f0201..c7c4dad 100644
--- a/tests/IntegrationTest.cs
+++ b/tests/IntegrationTest.cs
@@ -29,7 +29,7 @@ protected IntegrationTest(ITestOutputHelper output)
var apiKey = Environment.GetEnvironmentVariable("MANDRILL_API_KEY");
if (string.IsNullOrEmpty(apiKey))
{
- Assert.True(false, "You must set the user environment variable MANDRILL_API_KEY in order to run these tests. " +
+ Assert.Fail("You must set the user environment variable MANDRILL_API_KEY in order to run these tests. " +
"Go to https://mandrillapp.com/ to obtain an api key.");
}
return apiKey;
diff --git a/tests/MandrillApiTest.cs b/tests/MandrillApiTest.cs
index 976bc3f..cfda54c 100644
--- a/tests/MandrillApiTest.cs
+++ b/tests/MandrillApiTest.cs
@@ -59,7 +59,7 @@ public async Task MandrillApi_ctor_non_default_client_controls_its_lifecycle()
}
catch (ObjectDisposedException)
{
- Assert.False(true, "Should not have been disposed");
+ Assert.Fail("Should not have been disposed");
}
catch (HttpRequestException)
{
diff --git a/tests/Messages.cs b/tests/Messages.cs
index 2055248..ce0929f 100644
--- a/tests/Messages.cs
+++ b/tests/Messages.cs
@@ -30,7 +30,7 @@ void AssertResults(IEnumerable result)
{
if (response.Status == MandrillSendMessageResponseStatus.Invalid)
{
- Assert.True(false, "invalid email: " + response.RejectReason);
+ Assert.Fail("invalid email: " + response.RejectReason);
}
if (response.Status == MandrillSendMessageResponseStatus.Rejected &&
response.RejectReason == "unsigned")
@@ -40,7 +40,7 @@ void AssertResults(IEnumerable result)
}
if (response.Status == MandrillSendMessageResponseStatus.Rejected)
{
- Assert.True(false, "rejected email: " + response.RejectReason);
+ Assert.Fail("rejected email: " + response.RejectReason);
}
@@ -50,7 +50,7 @@ void AssertResults(IEnumerable result)
break;
}
- Assert.True(false, "Unexptected status:" + response.Status);
+ Assert.Fail("Unexptected status:" + response.Status);
}
}
@@ -390,11 +390,11 @@ public async Task Can_send_message()
};
message.Images.Add(new MandrillImage("image/png", "mandrill_logo", TestData.PngImage));
message.Attachments.Add(new MandrillAttachment("text/plain", "message.txt", Encoding.UTF8.GetBytes("This is an attachment.\n")));
- message.Attachments.Add(new MandrillAttachment(MandrillAttachmentType.Txt, "message.txt", Encoding.UTF8.GetBytes("This is an attachment.\n")));
+ message.Attachments.Add(new MandrillAttachment(MandrillAttachmentType.Txt, "message2.txt", Encoding.UTF8.GetBytes("This is also an attachment.\n")));
var result = await Api.Messages.SendAsync(message);
- result.Should().HaveCount(3);
+ result.Should().HaveCount(2);
AssertResults(result);
}