Ejemplo n.º 1
0
        private static DataLoaderOptions CreateLocalOptions(DataLoaderOptions options)
        {
            DataLoaderOptions local = options.Copy();

            local.MaxBatchSize = 1;
            return(local);
        }
        public void Copy()
        {
            // arrange
            var options = new DataLoaderOptions
            {
                Cache            = new TaskCache(1),
                Caching          = true,
                MaxBatchSize     = 1,
                DiagnosticEvents = new DataLoaderDiagnosticEventListener()
            };

            // act
            DataLoaderOptions copy = options.Copy();

            // assert
            Assert.NotNull(copy.Cache);
            Assert.True(copy.Caching);
            Assert.Equal(1, copy.MaxBatchSize);
            Assert.NotNull(copy.DiagnosticEvents);
        }