Tutorial

2. Testing PlaceOrder

In this chapter we give Shopfront a test project. By the end, dotnet test checks each junction on its own, runs PlaceOrder the way the application does and reads back the record Trax kept, starts the whole application and calls POST /orders, and runs the guards Trax ships for a project's shape.

From here on, every chapter adds tests for what it builds.

This chapter starts from the end of chapter 1. Every C# block on this page is compiled in CI together with the chapters before it.

In this chapter

  1. Three kinds of test
  2. Add a solution and a test project
  3. Test a junction
  4. Test the train
  5. Test the host
  6. Guard the project's shape
  7. Run them

SDK Reference

ITrainBus | UseInMemory | SaveTrainParameters | Metadata | Mediator testing | Architecture guards


Next: 2.1 Three kinds of test