]> git.localhorst.tv Git - blank.git/blob - tst/integration/ServerTest.cpp
simple test for client
[blank.git] / tst / integration / ServerTest.cpp
1 #include "ServerTest.hpp"
2
3 #include "TestInstance.hpp"
4
5 CPPUNIT_TEST_SUITE_REGISTRATION(blank::test::ServerTest);
6
7
8 namespace blank {
9 namespace test {
10
11 void ServerTest::setUp() {
12         instance.reset(new TestInstance({ "--server" }, true));
13         instance->AssertRunning();
14         instance->AssertOutputLine("loading spawn chunks");
15         instance->AssertOutputLine("listening on UDP port 12354");
16 }
17
18 void ServerTest::tearDown() {
19         std::unique_ptr<TestInstance> inst(std::move(instance));
20         if (inst) {
21                 inst->Terminate();
22                 inst->AssertOutputLine("saving remaining chunks");
23                 inst->AssertNoOutput();
24                 inst->AssertNoError();
25                 inst->AssertExitStatus(0);
26         }
27 }
28
29
30 void ServerTest::testStartup() {
31         // setUp and testDown do all the tests
32 }
33
34 }
35 }