public void Can_wait_for_gump() { var testProxy = new InfusionTestProxy(); Gump resultGump = null; var task = Task.Run(() => { resultGump = testProxy.Api.WaitForGump(); }); testProxy.Api.WaitForGumpStartedEvent.AssertWaitOneSuccess(); testProxy.PacketReceivedFromServer(SendGumpMenuDialogPackets.Explevel).Should().NotBeNull(); task.AssertWaitFastSuccess(); resultGump.Should().NotBeNull(); }
public void Can_publish_event_after_receiving_gump() { var testProxy = new InfusionTestProxy(); var journal = testProxy.Api.CreateEventJournal(); Gump resultGump = null; var task = Task.Run(() => { journal.When <Events.GumpReceivedEvent>(e => resultGump = e.Gump) .WaitAny(); }); journal.AwaitingStarted.AssertWaitOneSuccess(); testProxy.PacketReceivedFromServer(SendGumpMenuDialogPackets.Explevel); task.AssertWaitFastSuccess(); resultGump.Should().NotBeNull(); }