public void ForType_should_not_return_null()
        {
            var configurator =
                new TypeDefaultConventionConfigurator();

            var builder =
                configurator.ForType<object>();

            builder.ShouldNotBeNull();
        }
Esempio n. 2
0
        public void ForType_should_not_return_null()
        {
            var configurator =
                new TypeDefaultConventionConfigurator();

            var builder =
                configurator.ForType <object>();

            builder.ShouldNotBeNull();
        }
        public void GetDefaultConventions_should_return_conventions_for_each_configured_type()
        {
            var configurator =
                new TypeDefaultConventionConfigurator();

            configurator.ForType<string>();
            configurator.ForType<object>();

            var conventions =
                configurator.GetDefaultConventions();

            conventions.Count().ShouldEqual(2);
        }
Esempio n. 4
0
        public void GetDefaultConventions_should_return_conventions_for_each_configured_type()
        {
            var configurator =
                new TypeDefaultConventionConfigurator();

            configurator.ForType <string>();
            configurator.ForType <object>();

            var conventions =
                configurator.GetDefaultConventions();

            conventions.Count().ShouldEqual(2);
        }
        public void Configure(Action <ITypeDefaultConventionConfigurator> closure)
        {
            if (closure == null)
            {
                throw new ArgumentNullException("closure", "The closure cannot be null.");
            }

            var configurator =
                new TypeDefaultConventionConfigurator();

            closure(configurator);

            var conventions =
                configurator.GetDefaultConventions();

            this.DefaultConventions.AddRange(conventions);
        }
        public void Configure(Action<ITypeDefaultConventionConfigurator> closure)
        {
            if (closure == null)
            {
                throw new ArgumentNullException("closure", "The closure cannot be null.");
            }

            var configurator =
                new TypeDefaultConventionConfigurator();

            closure(configurator);

            var conventions =
                configurator.GetDefaultConventions();

            this.DefaultConventions.AddRange(conventions);
        }