Skip to content

Commit 0da4f4e

Browse files
jackmahoneyjackmahoney
authored andcommitted
Merge branch 'master' of github.com:mailslurp/examples
2 parents 0267722 + 9a7b33c commit 0da4f4e

File tree

20 files changed

+225
-4
lines changed

20 files changed

+225
-4
lines changed

csharp-dotnet-core3/ExampleService.Tests/ExampleService.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<IsPackable>false</IsPackable>
55
</PropertyGroup>
66
<ItemGroup>
7-
<PackageReference Include="mailslurp" Version="15.0.2" />
7+
<PackageReference Include="mailslurp" Version="15.12.11" />
88
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
99
<PackageReference Include="xunit" Version="2.4.0" />
1010
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />

csharp-smtp-client-xunit/SmtpService.Tests/SmtpService.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<ItemGroup>
1111
<PackageReference Include="FluentAssertions" Version="6.4.0"/>
12-
<PackageReference Include="mailslurp" Version="15.5.0"/>
12+
<PackageReference Include="mailslurp" Version="15.12.3"/>
1313
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0"/>
1414
<PackageReference Include="xunit" Version="2.4.1"/>
1515
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">

csharp-smtp-client-xunit/SmtpService.Tests/UnitTest1.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ public class UnitTest1
1313
[Fact]
1414
public void CanSendEmailWithMailSlurpSmtp()
1515
{
16-
var apiKey = Environment.GetEnvironmentVariable("API_KEY")
17-
?? throw new ArgumentNullException("Missing API_KEY environment variable containing MailSlurp key");
16+
var apiKey = "wus_test";
1817

1918
// configure client
2019
var config = new Configuration();

fsharp-email-mstest/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
bin
2+
obj

fsharp-email-mstest/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
-include ../.env
2+
3+
install:
4+
dotnet restore
5+
dotnet build
6+
7+
test:
8+
API_KEY=$(API_KEY) dotnet test
9+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "fsharp-email-mstest", "fsharp-email-mstest\fsharp-email-mstest.fsproj", "{2033D994-A556-4FD9-8ABF-AD7D10F2A93F}"
4+
EndProject
5+
Global
6+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
7+
Debug|Any CPU = Debug|Any CPU
8+
Release|Any CPU = Release|Any CPU
9+
EndGlobalSection
10+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
11+
{2033D994-A556-4FD9-8ABF-AD7D10F2A93F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
12+
{2033D994-A556-4FD9-8ABF-AD7D10F2A93F}.Debug|Any CPU.Build.0 = Debug|Any CPU
13+
{2033D994-A556-4FD9-8ABF-AD7D10F2A93F}.Release|Any CPU.ActiveCfg = Release|Any CPU
14+
{2033D994-A556-4FD9-8ABF-AD7D10F2A93F}.Release|Any CPU.Build.0 = Release|Any CPU
15+
EndGlobalSection
16+
EndGlobal
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module Program = let [<EntryPoint>] main _ = 0
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
namespace fsharp_email_mstest
2+
3+
open System
4+
open Microsoft.VisualStudio.TestTools.UnitTesting
5+
open mailslurp.Client
6+
7+
[<TestClass>]
8+
type TestClass () =
9+
10+
[<TestMethod>]
11+
member this.TestMethodPassing () =
12+
let apiKey = Environment.GetEnvironmentVariable("API_KEY")
13+
Assert.IsNotNull(apiKey)
14+
let config = Configuration()
15+
config.ApiKey.Add("x-api-key", apiKey);
16+
Assert.IsTrue(true)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<RootNamespace>fsharp_email_mstest</RootNamespace>
6+
7+
<IsPackable>false</IsPackable>
8+
<GenerateProgramFile>false</GenerateProgramFile>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<Compile Include="Tests.fs" />
13+
<Compile Include="Program.fs" />
14+
</ItemGroup>
15+
16+
<ItemGroup>
17+
<PackageReference Include="mailslurp" Version="15.12.17" />
18+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
19+
<PackageReference Include="MSTest.TestAdapter" Version="2.1.0" />
20+
<PackageReference Include="MSTest.TestFramework" Version="2.1.0" />
21+
<PackageReference Include="coverlet.collector" Version="1.2.0" />
22+
</ItemGroup>
23+
24+
</Project>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
/*.xcodeproj
5+
xcuserdata/
6+
DerivedData/
7+
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

0 commit comments

Comments
 (0)