示例#1
0
        public void VerifyContainer_ShouldNotThrow()
        {
            // arrange
            var settings = new List <KeyValuePair <string, string> >()
            {
                new KeyValuePair <string, string>("FlexKids:Host", "x"),
                new KeyValuePair <string, string>("FlexKids:Username", "x"),
                new KeyValuePair <string, string>("FlexKids:Password", "x"),
                new KeyValuePair <string, string>("GoogleCalendar:CalendarId", "x"),
                new KeyValuePair <string, string>("GoogleCalendar:Account", "x"),
                new KeyValuePair <string, string>("GoogleCalendar:PrivateKey", "x"),
                new KeyValuePair <string, string>("Smtp:Host", "x"),
                new KeyValuePair <string, string>("Smtp:Port", "12"),
                new KeyValuePair <string, string>("Smtp:Username", "x"),
                new KeyValuePair <string, string>("Smtp:Secure", "true"),
                new KeyValuePair <string, string>("NotificationSubscriptions:From:Name", "aa"),
                new KeyValuePair <string, string>("NotificationSubscriptions:From:Email", "*****@*****.**"),
                new KeyValuePair <string, string>("NotificationSubscriptions:To:0:Name", "bb"),
                new KeyValuePair <string, string>("NotificationSubscriptions:To:0:Email", "*****@*****.**"),
                new KeyValuePair <string, string>("ConnectionStrings:FlexKidsContext", "*****@*****.**"),
            };

            IConfiguration configuration = new ConfigurationBuilder()
                                           .AddInMemoryCollection(settings)
                                           .Build();
            var sut = new TestableExecutor(configuration, new NullLoggerFactory());

            // act
            Action act = () => sut.VerifyContainer();

            // assert
            act.Should().NotThrow();
        }
 public ReturnPropertiesTests()
 {
     _idProvider = new IdProvider();
     _searchManager = Substitute.For<ISearchManager>();
     _executor = new TestableExecutor(_idProvider, _searchManager);
 }