mailslurp-examples - fsharp-email-mstest

https://github.com/mailslurp/examples

Table of Contents

fsharp-email-mstest/fsharp-email-mstest.sln


Microsoft Visual Studio Solution File, Format Version 12.00
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "fsharp-email-mstest", "fsharp-email-mstest\fsharp-email-mstest.fsproj", "{2033D994-A556-4FD9-8ABF-AD7D10F2A93F}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{2033D994-A556-4FD9-8ABF-AD7D10F2A93F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{2033D994-A556-4FD9-8ABF-AD7D10F2A93F}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{2033D994-A556-4FD9-8ABF-AD7D10F2A93F}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{2033D994-A556-4FD9-8ABF-AD7D10F2A93F}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
EndGlobal

fsharp-email-mstest/Makefile

-include ../.env

install:
	dotnet restore
	dotnet build

test:
	API_KEY=$(API_KEY) dotnet test

fsharp-email-mstest/fsharp-email-mstest/fsharp-email-mstest.fsproj

<Project Sdk="Microsoft.NET.Sdk">

    <PropertyGroup>
        <TargetFramework>netcoreapp3.1</TargetFramework>
        <RootNamespace>fsharp_email_mstest</RootNamespace>

        <IsPackable>false</IsPackable>
        <GenerateProgramFile>false</GenerateProgramFile>
    </PropertyGroup>

    <ItemGroup>
        <Compile Include="Tests.fs" />
        <Compile Include="Program.fs" />
    </ItemGroup>

    <ItemGroup>
        <PackageReference Include="mailslurp" Version="15.12.17" />
        <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
        <PackageReference Include="MSTest.TestAdapter" Version="2.1.0" />
        <PackageReference Include="MSTest.TestFramework" Version="2.1.0" />
        <PackageReference Include="coverlet.collector" Version="1.2.0" />
    </ItemGroup>

</Project>

fsharp-email-mstest/fsharp-email-mstest/Tests.fs

namespace fsharp_email_mstest

open System
open Microsoft.VisualStudio.TestTools.UnitTesting
open mailslurp.Client

[<TestClass>]
type TestClass () =

    [<TestMethod>]
    member this.TestMethodPassing () =
        let apiKey = Environment.GetEnvironmentVariable("API_KEY")
        Assert.IsNotNull(apiKey)
        let config = Configuration()
        config.ApiKey.Add("x-api-key", apiKey);
        Assert.IsTrue(true)

fsharp-email-mstest/fsharp-email-mstest/Program.fs

module Program = let [<EntryPoint>] main _ = 0

fsharp-email-mstest/fsharp-email-mstest/.gitignore

TestResults