Esempio n. 1
0
        public void NotGeneric_Default_ResetsSource()
        {
            EngineConfigurationTypeBuilder       configuration         = new EngineConfigurationTypeBuilder(typeof(SimpleUser));
            EngineConfigurationTypeMemberBuilder propertyConfiguration = new EngineConfigurationTypeMemberBuilder(null, configuration);

            propertyConfiguration.Use(typeof(SimpleDataSource));
            propertyConfiguration.Default();

            Assert.AreEqual(0, propertyConfiguration.GetDatasources().Count());
        }
Esempio n. 2
0
        public void Generic_Default_ResetsSource()
        {
            EngineConfigurationTypeBuilder <SimpleUser> configuration = new EngineConfigurationTypeBuilder <SimpleUser>();
            EngineConfigurationTypeMemberBuilder <SimpleUser, string> propertyConfiguration = new EngineConfigurationTypeMemberBuilder <SimpleUser, string>(null, configuration);

            propertyConfiguration.Use <SimpleDataSource>();
            propertyConfiguration.Default();

            Assert.AreEqual(0, propertyConfiguration.GetDatasources().Count());
        }
Esempio n. 3
0
        public void Generic_GetConfigurationAction_Invalid_ReturnsNULL()
        {
            EngineConfigurationTypeBuilder <SimpleUser> configuration = new EngineConfigurationTypeBuilder <SimpleUser>();
            EngineTypeMember member = ReflectionHelper.GetMember <SimpleUser>(x => x.EmailAddress);

            EngineConfigurationTypeMemberBuilder <SimpleUser, string> propertyConfiguration = new EngineConfigurationTypeMemberBuilder <SimpleUser, string>(
                member, configuration);

            IEngineConfigurationDatasource returnAction = propertyConfiguration.GetDatasources().FirstOrDefault();

            Assert.Null(returnAction);
        }