Example #1
0
        public void PartyHandlerAdd()
        {
            var handler   = new PartyRequestAction();
            var player    = CreatePartyMember();
            var toRequest = CreatePartyMember();

            player.Observers.Add(toRequest);

            handler.HandlePartyRequest(player, toRequest);

            Mock.Get(toRequest.PlayerView.PartyView).Verify(v => v.ShowPartyRequest(player), Times.Once);
            Assert.That(toRequest.LastPartyRequester, Is.SameAs(player));
        }
Example #2
0
        public void PartyHandlerAdd()
        {
            var handler   = new PartyRequestAction();
            var player    = CreatePartyMember();
            var toRequest = CreatePartyMember();

            player.Observers.Add(toRequest);
            toRequest.PlayerView.PartyView.Expect(v => v.ShowPartyRequest(player));

            handler.HandlePartyRequest(player, toRequest);

            toRequest.PlayerView.PartyView.VerifyAllExpectations();
            Assert.That(toRequest.LastPartyRequester, Is.SameAs(player));
        }