Skip to content

Question on testing/mocking internals #38

@christophwille

Description

@christophwille

I wrote myself a simple do-nothing sample and added basic unit tests that run outside WASM:

https://github.com/christophwille/SpinHello/blob/main/src/Tests/SampleUnitTests.cs

Going one step further would be taking https://github.com/fermyon/spin-dotnet-sdk/blob/c12d70e36a274396c7b1ded7a06ec913748bdb3d/samples/hello-world/Handler.cs#L43 And here the question comes up of how to properly mock that guy - do you envision me to wrap it in a service that I replace (IOutboundHttp with one real implemenation and one Mock) or is this an area that is "undefined" as of now?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions