Every method in a testing suite that begins with "Test" will be run as a test. TestOne is an example of a test. For the purposes of this example, we've included assertions in the tests, since most tests will issue assertions.
()
| 219 | // this example, we've included assertions in the tests, since most |
| 220 | // tests will issue assertions. |
| 221 | func (suite *SuiteTester) TestOne() { |
| 222 | beforeCount := suite.TestOneRunCount |
| 223 | suite.TestOneRunCount++ |
| 224 | assert.Equal(suite.T(), suite.TestOneRunCount, beforeCount+1) |
| 225 | suite.Equal(suite.TestOneRunCount, beforeCount+1) |
| 226 | } |
| 227 | |
| 228 | // TestTwo is another example of a test. |
| 229 | func (suite *SuiteTester) TestTwo() { |