public void TestSubscribeOnAll() { Action <object[]> actCallback = args => { args[0].Should().Be(1); args[1].Should().Be(2); }; var clientContract = new TestClientContract(actCallback); var subscriptions = _fixture.Proxy.SubscribeOnAll(clientContract); _fixture.HubProxyMock.Object.InvokeEvent(hub => hub.Passing2Params(1, 2)); subscriptions?.ToList().ForEach(s => s.Dispose()); }
public void TestSubscribeOnAllWithMoreThan2ParametersShouldNotFail() { Action <object[]> actCallback = args => { args[0].Should().Be(1); args[1].Should().Be(2); args[2].Should().Be(3); }; var clientContract = new TestClientContract(actCallback); IEnumerable <IDisposable> subscriptions = null; Action act = () => subscriptions = _fixture.Proxy.SubscribeOnAll(clientContract); act.ShouldNotThrow(TestConsts.ERR_SHOULD_FIX_ISSUE_9); _fixture.HubProxyMock.Object.InvokeEvent(hub => hub.Passing3Params(1, 2, 3)); subscriptions?.ToList().ForEach(s => s.Dispose()); }