Esempio n. 1
0
        public void ConstructorEmpty()
        {
            // act
            var options = new DataLoaderOptions <string>();

            // assert
            options.MatchSnapshot();
        }
Esempio n. 2
0
        public void ConstructorAllProps()
        {
            // act
            var options = new DataLoaderOptions <string>
            {
                Batch            = false,
                Cache            = new TaskCache(1),
                CacheKeyResolver = k => k,
                CacheSize        = 1,
                Caching          = false,
                MaxBatchSize     = 1
            };

            // assert
            options.MatchSnapshot(matchOptions => matchOptions
                                  .Assert(fieldOption =>
                                          Assert.NotNull(fieldOption.Field <object>("CacheKeyResolver"))));
        }