public void SetUp() { var builderSetup = new BuilderSettings(); reflectionUtil = Substitute.For<IReflectionUtil>(); generator = Substitute.For<IRandomGenerator>(); propertyNamer = new RandomValuePropertyNamer(generator, reflectionUtil, false,builderSetup); }
public void SetUp() { mocks = new MockRepository(); reflectionUtil = mocks.StrictMock <IReflectionUtil>(); propertyNamer = mocks.StrictMock <IPropertyNamer>(); }
public void SetUp() { mocks = new MockRepository(); reflectionUtil = mocks.StrictMock<IReflectionUtil>(); propertyNamer = mocks.StrictMock<IPropertyNamer>(); }
public void SetUp() { var builderSetup = new BuilderSettings(); reflectionUtil = Substitute.For <IReflectionUtil>(); generator = Substitute.For <IRandomGenerator>(); propertyNamer = new RandomValuePropertyNamer(generator, reflectionUtil, false, builderSetup); }
public void SetUp() { IReflectionUtil reflectionUtil = MockRepository.GenerateStub <IReflectionUtil>(); reflectionUtil.Stub(p => p.IsDefaultValue(Arg <int> .Is.Anything)).Return(true); propertyNamer = new PropertyNamerStub(reflectionUtil); }
public void SetUp() { BuilderSettings builderSettings = new BuilderSettings(); IReflectionUtil reflectionUtil = Substitute.For <IReflectionUtil>(); reflectionUtil.IsDefaultValue(Arg.Any <int?>()).Returns(true); propertyNamer = new PropertyNamerStub(reflectionUtil, builderSettings); }
public RandomValuePropertyNamer(IRandomGenerator generator, IReflectionUtil reflectionUtil, bool generatePositiveValuesOnly, DateTime minDate, DateTime maxDate, bool useLoremIpsumForStrings) : base(reflectionUtil) { this.generator = generator; this.generatePositiveValuesOnly = generatePositiveValuesOnly; this.useLoremIpsumForStrings = useLoremIpsumForStrings; this.minDate = minDate; this.maxDate = maxDate; }
public ObjectBuilderTests() { var builderSetup = new BuilderSettings(); reflectionUtil = Substitute.For <IReflectionUtil>(); builder = new ObjectBuilder <MyClass>(reflectionUtil, builderSetup); myClassWithConstructorBuilder = new ObjectBuilder <MyClassWithConstructor>(reflectionUtil, builderSetup); myClassWithOptionalConstructorBuilder = new ObjectBuilder <MyClassWithOptionalConstructor>(reflectionUtil, builderSetup); }
public void SetUp() { mocks = new MockRepository(); reflectionUtil = mocks.DynamicMock<IReflectionUtil>(); builder = new ObjectBuilder<MyClass>(reflectionUtil); myClassWithConstructorBuilder = new ObjectBuilder<MyClassWithConstructor>(reflectionUtil); myClassWithOptionalConstructorBuilder = new ObjectBuilder<MyClassWithOptionalConstructor>(reflectionUtil); }
public void SetUp() { mocks = new MockRepository(); reflectionUtil = mocks.DynamicMock <IReflectionUtil>(); builder = new ObjectBuilder <MyClass>(reflectionUtil); myClassWithConstructorBuilder = new ObjectBuilder <MyClassWithConstructor>(reflectionUtil); myClassWithOptionalConstructorBuilder = new ObjectBuilder <MyClassWithOptionalConstructor>(reflectionUtil); }
public FormSubmissionContextPropertyValueReader(string propertyName) { if (string.IsNullOrWhiteSpace(propertyName)) { throw new ArgumentOutOfRangeException(nameof(propertyName), (object)propertyName, "Property name must be specified."); } this.PropertyName = propertyName; this.ReflectionUtil = Sitecore.DataExchange.DataAccess.Reflection.ReflectionUtil.Instance; }
public CustomProductPropertyNamer(IReflectionUtil reflectionUtil, BuilderSettings builderSettings) : base(reflectionUtil, builderSettings) { aisleGenerator = new SequentialGenerator <char>(); shelfGenerator = new SequentialGenerator <int> { Increment = 2 }; locGenerator = new SequentialGenerator <int> { Increment = 1000 }; }
public ListBuilder(int size, IPropertyNamer propertyNamer, IReflectionUtil reflectionUtil) { this.size = size; this.propertyNamer = propertyNamer; this.reflectionUtil = reflectionUtil; mainList = new T[size]; declarations = new DeclarationQueue <T>(size); ScopeUniqueRandomGenerator = new UniqueRandomGenerator(); }
public void SetUp() { reflectionUtil = MockRepository.GenerateStub<IReflectionUtil>(); reflectionUtil.Stub(x => x.IsDefaultValue(null)).IgnoreArguments().Return(true).Repeat.Any(); theList = new List<MyClass>(); for (int i = 0; i < listSize; i++) theList.Add(new MyClass()); new SequentialPropertyNamer(reflectionUtil,new BuilderSetup()).SetValuesOfAllIn(theList); }
public ListBuilder(int size, IPropertyNamer propertyNamer, IReflectionUtil reflectionUtil, BuilderSettings builderSettings) { this.Capacity = size; this.propertyNamer = propertyNamer; this.reflectionUtil = reflectionUtil; BuilderSettings = builderSettings; mainList = new T[size]; declarations = new DeclarationQueue <T>(size); ScopeUniqueRandomGenerator = new UniqueRandomGenerator(); }
public void SetUp() { reflectionUtil = MockRepository.GenerateStub <IReflectionUtil>(); reflectionUtil.Stub(x => x.IsDefaultValue(null)).IgnoreArguments().Return(true).Repeat.Any(); theList = new List <MyClass>(); for (int i = 0; i < listSize; i++) { theList.Add(new MyClass()); } new SequentialPropertyNamer(reflectionUtil, new BuilderSettings()).SetValuesOfAllIn(theList); }
public void SetUp() { reflectionUtil = new ReflectionUtil(); theList = new List <MyClass>(); for (int i = 0; i < listSize; i++) { theList.Add(new MyClass()); } new SequentialPropertyNamer(reflectionUtil, new BuilderSettings()) .SetValuesOfAllIn(theList); }
public RandomValuePropertyNamerTests_LoremIpsumStrings() { generator = Substitute.For <IRandomGenerator>(); reflectionUtil = Substitute.For <IReflectionUtil>(); reflectionUtil.IsDefaultValue(null).Returns(true); theList = new List <MyClass>(); for (int i = 0; i < listSize; i++) { theList.Add(new MyClass()); } // The lorem ipsum string generator does this to get a random length of the string generator.Next(1, 10).Returns(5); new RandomValuePropertyNamer(generator, reflectionUtil, false, DateTime.MinValue, DateTime.MaxValue, true, new BuilderSettings()).SetValuesOfAllIn(theList); }
public void SetUp() { mocks = new MockRepository(); generator = MockRepository.GenerateStub<IRandomGenerator>(); reflectionUtil = MockRepository.GenerateStub<IReflectionUtil>(); reflectionUtil.Stub(x => x.IsDefaultValue(null)).IgnoreArguments().Return(true).Repeat.Any(); theList = new List<MyClass>(); for (int i = 0; i < listSize; i++) theList.Add(new MyClass()); // The lorem ipsum string generator does this to get a random length of the string generator.Expect(x => x.Next(1, 10)).Return(5).Repeat.Any(); new RandomValuePropertyNamer(generator, reflectionUtil, false, DateTime.MinValue, DateTime.MaxValue, true,new BuilderSetup()).SetValuesOfAllIn(theList); }
public void SetUp() { mocks = new MockRepository(); generator = MockRepository.GenerateStub <IRandomGenerator>(); reflectionUtil = MockRepository.GenerateStub <IReflectionUtil>(); reflectionUtil.Stub(x => x.IsDefaultValue(null)).IgnoreArguments().Return(true).Repeat.Any(); theList = new List <MyClass>(); for (int i = 0; i < listSize; i++) { theList.Add(new MyClass()); } // The lorem ipsum string generator does this to get a random length of the string generator.Expect(x => x.Next(1, 10)).Return(5).Repeat.Any(); new RandomValuePropertyNamer(generator, reflectionUtil, false, DateTime.MinValue, DateTime.MaxValue, true, new BuilderSetup()).SetValuesOfAllIn(theList); }
public void SetUp() { reflectionUtil = MockRepository.GenerateStub <IReflectionUtil>(); propertyNamer = new SequentialPropertyNamer(reflectionUtil); }
public ObjectBuilder(Type type, IReflectionUtil reflectionUtil) { _type = type; _reflectionUtil = reflectionUtil; }
public SequentialPropertyNamer(IReflectionUtil reflectionUtil, BuilderSettings builderSettings) : base(reflectionUtil, builderSettings) { }
public IndexerPropertyValueReader(params object[] indexes) { this.ReflectionUtil = Sitecore.DataExchange.DataAccess.Reflection.ReflectionUtil.Instance; this.ContainsIndexMethodNames = new List <string>(); this.Indexes = indexes; }
public void SetUp() { reflectionUtil = MockRepository.GenerateStub<IReflectionUtil>(); propertyNamer = new SequentialPropertyNamer(reflectionUtil); }
public SequentialPropertyNamer(IReflectionUtil reflectionUtil) : base(reflectionUtil) { }
public void SetUp() { reflectionUtil = Substitute.For <IReflectionUtil>(); propertyNamer = Substitute.For <IPropertyNamer>(); }
public RandomValuePropertyNamer(IRandomGenerator generator, IReflectionUtil reflectionUtil, bool generatePositiveValuesOnly, BuilderSetup builderSetup) : this(generator, reflectionUtil, generatePositiveValuesOnly, DateTime.MinValue, DateTime.MaxValue, false, builderSetup) { this.generator = generator; }
public PropertyNamerStub(IReflectionUtil reflectionUtil, BuilderSettings builderSettings) : base(reflectionUtil, builderSettings) { }
public ObjectBuilder(IReflectionUtil reflectionUtil, BuilderSetup builderSetup) { BuilderSetup = builderSetup; this.reflectionUtil = reflectionUtil; }
public SequentialPropertyNamerTests() { reflectionUtil = Substitute.For <IReflectionUtil>(); propertyNamer = new SequentialPropertyNamer(reflectionUtil, new BuilderSettings()); }
public ObjectBuilder(IReflectionUtil reflectionUtil, BuilderSettings builderSettings) { BuilderSettings = builderSettings; this.reflectionUtil = reflectionUtil; }
public ObjectBuilder(IReflectionUtil reflectionUtil) { this.reflectionUtil = reflectionUtil; }
public PersistableEntityPropertyNamer(IReflectionUtil reflectionUtil) : base(reflectionUtil) { }
public MyPropertyNamer(IReflectionUtil reflectionUtil) : base(reflectionUtil) { }
public void SetUp() { reflectionUtil = Substitute.For <IReflectionUtil>(); generator = Substitute.For <IRandomGenerator>(); propertyNamer = new RandomValuePropertyNamer(generator, reflectionUtil, false); }
public PropertyNamerStub(IReflectionUtil reflectionUtil) : base(reflectionUtil) { }
protected PropertyNamer(IReflectionUtil reflectionUtil, BuilderSetup builderSetup) { this.ReflectionUtil = reflectionUtil; _builderSetup = builderSetup; }
protected PropertyNamer(IReflectionUtil reflectionUtil) { this.ReflectionUtil = reflectionUtil; }
public void SetUp() { reflectionUtil = Substitute.For<IReflectionUtil>(); generator = Substitute.For<IRandomGenerator>(); propertyNamer = new RandomValuePropertyNamer(generator, reflectionUtil, false); }