Exemplo n.º 1
0
        public void AddDataLoaderRegistry_ServicesIsNull()
        {
            // arrange
            // act
            Action action = () =>
                            DataLoaderServiceCollectionExtensions
                            .AddDataLoaderRegistry(null);

            // assert
            Assert.Throws <ArgumentNullException>(action);
        }
Exemplo n.º 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();
        }