Пример #1
0
        public Mock(Type mockType, MockBuilder builder, DxSettings settings, IEnumerable<object> constructorArgs = null)
        {
            if (mockType.IsSealed && !settings.CreateSealedClasses)
                throw new InvalidOperationException("Cannot mock a sealed class" + mockType.Name);

            ConstructorArgs = constructorArgs ?? Enumerable.Empty<object>();
            Settings = settings;
            MockType = mockType;
            MockInfo = builder;
        }
Пример #2
0
 public MockBuilder(IReservedTerms mockSettings, DxSettings testSettings, IEnumerable<object> constructorArgs = null)
 {
     ConstructorArgs = constructorArgs ?? Enumerable.Empty<object>();
     MockSettings = new ReservedTermsContainer(mockSettings);
     TestSettings = testSettings;
 }
Пример #3
0
 public MockBuilder(DxSettings testSettings, IEnumerable<object> constructorArgs = null)
     : this(new ReservedTerms(), testSettings, constructorArgs)
 {
 }
Пример #4
0
 public TestArranger(DxSettings settings)
 {
     Settings = settings;
 }
Пример #5
0
 public TestData(DynamicBag testBag, DxSettings settings)
 {
     TestBag = testBag;
     Args = new TestArranger(settings);
     CArgs = new TestArranger(settings);
 }