Example #1
0
        public void GetGuildList()
        {
            this.RequestGuildAndRespond(true);
            var action = new GuildListRequestAction();

            action.RequestGuildList(this.player);
            var guildList = this.GuildServer.GetGuildList(this.player.GuildStatus.GuildId);

            Mock.Get(this.player.ViewPlugIns.GetPlugIn <IShowGuildListPlugIn>()).Verify(v => v.ShowGuildList(It.Is <IEnumerable <GuildListEntry> >(list => list.Any(entry => entry.PlayerName == this.player.SelectedCharacter.Name))), Times.Once());
            Assert.That(guildList.Any(entry => entry.PlayerName == this.player.SelectedCharacter.Name), Is.True);
        }
Example #2
0
        public void GetGuildList()
        {
            this.RequestGuildAndRespond(true);
            var action = new GuildListRequestAction(this.gameServerContext);

            this.player.PlayerView.GuildView.Expect(v => v.ShowGuildList(null)).IgnoreArguments();
            action.RequestGuildList(this.player);
            this.player.PlayerView.GuildView.VerifyAllExpectations();
            var guildList = this.GuildServer.GetGuildList(this.player.GuildStatus.GuildId);

            Assert.That(guildList.Any(entry => entry.PlayerName == this.player.SelectedCharacter.Name), Is.True);
        }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GuildListRequestHandler"/> class.
 /// </summary>
 /// <param name="gameContext">The game context.</param>
 public GuildListRequestHandler(IGameServerContext gameContext)
 {
     this.requestAction = new GuildListRequestAction(gameContext);
 }