Esempio n. 1
0
        public void Apply_WhenExtensionNotIConsumeConfigurationSection_ShouldNotApplySection()
        {
            var extension = new Mock <IExtension>(MockBehavior.Strict);
            var testee    = new ConsumeConfigurationSection(extension.Object);

            testee.Apply(null);

            extension.VerifyAll();
        }
Esempio n. 2
0
        public void Apply_WhenExtensionNotIConsumeConfigurationSection_ShouldNotApplySection()
        {
            var extension = A.Fake <IExtension>();
            var testee    = new ConsumeConfigurationSection(extension);

            testee.Apply(null);

            A.CallTo(extension).MustNotHaveHappened();
        }
Esempio n. 3
0
        public void Apply_WhenExtensionIConsumeConfigurationSection_ShouldApplySection()
        {
            var extension = new Mock <IExtension>();
            var consumer  = extension.As <IConsumeConfigurationSection>();

            var testee = new ConsumeConfigurationSection(extension.Object);

            testee.Apply(null);

            consumer.Verify(c => c.Apply(null));
        }
Esempio n. 4
0
        public void Apply_WhenExtensionIConsumeConfigurationSection_ShouldApplySection()
        {
            var extension = A.Fake <IExtension>(builder => builder.Implements(typeof(IConsumeConfigurationSection)));
            var consumer  = extension as IConsumeConfigurationSection;

            var testee = new ConsumeConfigurationSection(extension);

            testee.Apply(null);

            A.CallTo(() => consumer.Apply(null)).MustHaveHappened();
        }