private IEnumerable <IConvention> ProvideNamedConventions(IFixtureConfiguration configuration) { var dataGenerator = configuration.Locate <IRandomDataGeneratorService>(); var helper = configuration.Locate <IConstraintHelper>(); yield return(new StringNamedConvention(dataGenerator, helper)); }
private IEnumerable <IConvention> ProvideDefaultConventions(IFixtureConfiguration configuration) { var dataGenerator = configuration.Locate <IRandomDataGeneratorService>(); var helper = configuration.Locate <IConstraintHelper>(); yield return(new BoolConvention(dataGenerator)); yield return(new ByteConvention(dataGenerator, helper)); yield return(new CharConvention(dataGenerator, helper)); yield return(new DateTimeConvention(dataGenerator, helper)); yield return(new DecimalConvention(dataGenerator, helper)); yield return(new DelegateConvention(helper)); yield return(new DoubleConvention(dataGenerator, helper)); yield return(new EnumConvention(dataGenerator, helper)); yield return(new IntConvention(dataGenerator, helper)); yield return(new LongConvention(dataGenerator, helper)); yield return(new SByteConvention(dataGenerator, helper)); yield return(new ShortConvention(dataGenerator, helper)); yield return(new StringConvention(dataGenerator, helper)); yield return(new TimeSpanConvention(dataGenerator, helper)); yield return(new TypeConvention(dataGenerator)); yield return(new UIntConvention(dataGenerator, helper)); yield return(new ULongConvention(dataGenerator, helper)); yield return(new UriConvention(helper)); yield return(new UShortConvention(dataGenerator, helper)); yield return(new ComplexConvention(configuration)); yield return(new ArrayConvention()); yield return(new DictionaryConvention()); yield return(new ListConvention(configuration)); yield return(new ReadOnlyCollectionConvention()); yield return(new IComparerConvention()); yield return(new IEqualityComparerConvention()); yield return(new NullableConvention()); }
/// <summary> /// Default constructor /// </summary> /// <param name="configuration"></param> public ComplexConvention(IFixtureConfiguration configuration) { _configuration = configuration; _typeCreator = configuration.Locate <ITypeCreator>(); _typePopulator = configuration.Locate <ITypePopulator>(); _circularReferenceHandler = configuration.Locate <ICircularReferenceHandler>(); _modelService = configuration.Locate <IModelService>(); }
public TypePopulator(IFixtureConfiguration configuration, IConstraintHelper helper, ITypePropertySelector propertySelector, IPropertySetter setter, ITypeFieldSelector fieldSelector, IFieldSetter fieldSetter) { _configuration = configuration; _helper = helper; _propertySelector = propertySelector; _setter = setter; _fieldSelector = fieldSelector; _fieldSetter = fieldSetter; }
/// <summary> /// Default constructor /// </summary> /// <param name="configuration"></param> public Fixture(IFixtureConfiguration configuration = null) { _configuration = configuration ?? new DefaultFixtureConfiguration(); _conventions = _configuration.Locate <IConventionList>(); _behavior = new BehaviorCollection(); _returnConventions = new TypedConventions(Configuration, ConventionPriority.First); _typedConventions = new TypedConventions(Configuration); Initalize(); }
public IEnumerable <IConvention> ProvideConventions(IFixtureConfiguration configuration) { var conventions = new List <IConvention>(); if (configuration.UseDefaultConventions) { conventions.AddRange(ProvideDefaultConventions(configuration)); } if (configuration.UseNamedConventions) { conventions.AddRange(ProvideNamedConventions(configuration)); } return(conventions); }
public Db4oSolo(IFixtureConfiguration fixtureConfiguration) { FixtureConfiguration(fixtureConfiguration); }
public Db4oInMemory(IFixtureConfiguration fc) : this() { FixtureConfiguration(fc); }
void IDb4oFixture.FixtureConfiguration(IFixtureConfiguration configuration) { throw new NotImplementedException(); }
public virtual void FixtureConfiguration(IFixtureConfiguration fc) { _fixtureConfiguration = fc; }
/// <summary> /// Default constructor /// </summary> /// <param name="configuration"></param> /// <param name="defaultSingleton"></param> public SubFixture(IFixtureConfiguration configuration = null, bool defaultSingleton = true) : base(configuration) { Add(new SubstituteConvention(defaultSingleton)); }
public TypePropertySelector(IFixtureConfiguration configuration, IConstraintHelper helper) { _configuration = configuration; _helper = helper; }
/// <summary> /// Default constructor /// </summary> /// <param name="configuration"></param> /// <param name="priority"></param> public TypedConventions(IFixtureConfiguration configuration, ConventionPriority priority = ConventionPriority.High) { _configuration = configuration; Priority = priority; }
public FakeFixture(IFixtureConfiguration configuration = null, bool defaultSingleton = true) : base(configuration) { Add(new FakeConvention(defaultSingleton)); }
public TypeCreator(IFixtureConfiguration configuration, IConstructorSelector selector, IConstraintHelper constraintHelper) { _configuration = configuration; _selector = selector; _constraintHelper = constraintHelper; }
/// <summary> /// Default constructor /// </summary> /// <param name="configuration"></param> public ListConvention(IFixtureConfiguration configuration) { _configuration = configuration; }