Requirements() public method

public Requirements ( ) : IEnumerable
return IEnumerable
Esempio n. 1
0
        public void should_run_all_of_the_environment_checks_in_bootstrapping()
        {
            var activator = new FakeActivator();

            activator.SucceedWith("good");
            activator.SucceedWith("better");
            activator.SucceedWith("best");

            PackageRegistry.LoadPackages(x => {
                x.Activator(activator);
            });

            activator.Requirements().OfType <FakeEnvironmentReqirement>()
            .Select(x => x.WasCalled)
            .ShouldHaveTheSameElementsAs(true, true, true);
        }
Esempio n. 2
0
        public void environment_checks_are_logged_in_diagnostic_log()
        {
            var activator = new FakeActivator();

            activator.SucceedWith("good");
            activator.SucceedWith("better");
            activator.FailWith("worst");

            var activator2 = new FakeActivator();
            var activator3 = new FakeActivator();

            PackageRegistry.LoadPackages(x =>
            {
                x.Activator(activator);
                x.Activator(activator2);
                x.Activator(activator3);
            });

            PackageRegistry.Diagnostics.LogsForSubjectType <IEnvironmentRequirement>()
            .Select(x => x.Subject)
            .ShouldHaveTheSameElementsAs(activator.Requirements());
        }
        public void should_run_all_of_the_environment_checks_in_bootstrapping()
        {
            var activator = new FakeActivator();
            activator.SucceedWith("good");
            activator.SucceedWith("better");
            activator.SucceedWith("best");

            PackageRegistry.LoadPackages(x => {
                x.Activator(activator);
            });

            activator.Requirements().OfType<FakeEnvironmentReqirement>()
                .Select(x => x.WasCalled)
                .ShouldHaveTheSameElementsAs(true, true, true);
        }
        public void environment_checks_are_logged_in_diagnostic_log()
        {
            var activator = new FakeActivator();
            activator.SucceedWith("good");
            activator.SucceedWith("better");
            activator.FailWith("worst");

            var activator2 = new FakeActivator();
            var activator3 = new FakeActivator();

            PackageRegistry.LoadPackages(x =>
            {
                x.Activator(activator);
                x.Activator(activator2);
                x.Activator(activator3);
            });

            PackageRegistry.Diagnostics.LogsForSubjectType<IEnvironmentRequirement>()
                .Select(x => x.Subject)
                .ShouldHaveTheSameElementsAs(activator.Requirements());
        }