Пример #1
0
 protected void ConstructTestSubject()
 {
     ChannelUnderTest = new OneWayPullChannel
                        <LocalTestResource, RemoteTestResource, int, ItemMatch <LocalTestResource, RemoteTestResource> >(
         ChannelConfig,
         Plumber,
         () => Task.FromResult(LocalEndpoint.ReadAll().AsEnumerable()),
         () => Task.FromResult(RemoteEndpoint.ReadAll().AsEnumerable()));
 }
Пример #2
0
        public async Task ShouldBreakOutOfSynchronizationWhenDataSource2NullData()
        {
            // Should I throw an exception if one of the data providers returns null? I simply can not proceed.
            // Silently simply stepping out of the execution is not really informative.
            ChannelUnderTest = new OneWayPullChannel
                               <LocalTestResource, RemoteTestResource, int, ItemMatch <LocalTestResource, RemoteTestResource> >(
                ChannelConfig,
                Plumber,
                () => Task.FromResult(LocalEndpoint.ReadAll().AsEnumerable()),
                () => Task.FromResult((IEnumerable <RemoteTestResource>)null));

            await ChannelUnderTest.Synchronize();
        }