nunit/dotnet-new-nunit

class or module for F# NUnit template

Closed this issue · 2 comments

Ping @cartermp and @KevinRansom since you contributed/commented here before, is there any reason to keep class boilerplate by default here? It could just be a module (like xunit template):

module Company.TestProject1

open NUnit.Framework

[<SetUp>]
let Setup () =
    ()

[<Test>]
let Test1 () =
    Assert.Pass()

vs. current:

namespace Company.TestProject1

open NUnit.Framework

type TestClass () =

    [<SetUp>]
    member this.Setup () =
        ()

    [<Test>]
    member this.Test1 () =
        Assert.Pass()

No real reason. I think it'd be better to have them be module-bound function. That's what we use in the F# test suite: https://github.com/dotnet/fsharp/blob/master/tests/fsharp/Compiler/Language/AnonRecordTests.fs

Since #27 is merged, changes released under v1.6.3. I'll close this issue. Feel free to reopen the issue if something is wrong.