示例#1
0
        public void AddDataLoaderRegistry_ServicesIsNull()
        {
            // arrange
            // act
            Action action = () =>
                            DataLoaderServiceCollectionExtensions
                            .AddDataLoaderRegistry(null);

            // assert
            Assert.Throws <ArgumentNullException>(action);
        }
示例#2
0
        public void AddDataLoaderRegistry()
        {
            // arrange
            var services = new ServiceCollection();

            // act
            DataLoaderServiceCollectionExtensions.AddDataLoaderRegistry(services);

            // assert
            services
            .Select(t => t.ServiceType.GetTypeName())
            .OrderBy(t => t)
            .ToArray()
            .MatchSnapshot();
        }