public void ThirdPartyMatchProvider()
        {
            Assume.That(match != null, "Match is prepared");
            var matchProviderMonitor = _instance.SubscribeMatchesWithThirdParty();

            MatchReceivedEventArgs matchReceivedEvent = null;

            _instance.MatchReceived += (sender, e) => matchReceivedEvent = e;

            RunSync(() => matchProviderMonitor.ProvideMatchIdAsync(MatchId.Make(match.Id)));

            while (matchReceivedEvent == null)
            {
            }

            Assert.AreEqual(MatchChannel.ThirdParty, matchReceivedEvent.Channel);
            var receivedMatch = matchReceivedEvent.Matches.FirstOrDefault(m => m.Id == match.Id);

            Assert.NotNull(receivedMatch);
        }
Пример #2
0
        public void GetNotExistingMatchShouldReturnNull()
        {
            var match = RunSync(() => _instance.GetMatchAsync(MatchId.Make(Guid.NewGuid())));

            Assert.IsNull(match);
        }