예제 #1
0
        public void post_cancelGame_third_party_exception_test()
        {
            // Assert SaveFailRequestToDb() be called once
            _api = new FakeServerApi();
            Action action = () => _api.CancelGame();

            action.Should().Throw <WebException>();
            Assert.AreEqual(1, FakeServerApi.SaveFailRequestToDbCalledCount);
        }
예제 #2
0
 public void post_cancelGame_third_party_success_test()
 {
     // Assert success
     _api = new FakeServerApi1(0);
     Assert.AreEqual(ServerResponse.Correct, _api.CancelGame());
 }
예제 #3
0
 public void post_cancelGame_third_party_fail_test()
 {
     // Assert PostToThirdParty() return not correct should throw AuthFailException
     _api = new FakeServerApi1(99);
     Assert.ThrowsException <AuthFailException>(() => _api.CancelGame());
 }