mirror of
https://github.com/ysoftdevs/Theatrical-Players-Refactoring-Kata.git
synced 2026-01-14 23:53:26 +01:00
842 B
842 B
Theatrical-Players-Refactoring-Kata (Go)
This variant provides the kata in Go.
Installation
- Install Go 1.12 (or later)
- In the directory of this file, run
go mod download - You can then run tests with
go test ./...
Approval Tests
Approval tests are run with a basic home-grown approval function (see approval_test.go).
In short, for a new test case of TestPrinterPrintByApproval:
- Add a new
.in.jsonfile undertestdata/TestPrinterPrintByApproval. You can copy an existing one for starters. - Run
go test ./...- it should fail and complain about a missing file. - However, a
.out.txtfile will have been created - use this one as the new.approved.txtfile.
Approval-testing errors
Right now, the error is tested in-line. You can convert this test to an approval-test as well.