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); }
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); }