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 ShouldBreakOutOfSynchronizationWhenDataSource1NullData()
        {
            // 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((IEnumerable<LocalTestResource>)null),
                () => Task.FromResult((IEnumerable<RemoteTestResource>)null));

            await ChannelUnderTest.Synchronize();
        }