Beispiel #1
0
 private static void CreateNewContainerAndDbContext()
 {
     if (TestDependencyScope.IsInitialized())
     {
         TestDependencyScope.End();
         TestDependencyScope.Begin();
     }
 }
        public void Execute(TestClass testClass)
        {
            TestingIoC.Initialize();
            TestDependencyScope.Begin();

            ResetDatabase();

            var fixture = new Fixture();

            AutoFixtureParameterSource.CustomizeAutoFixture(fixture);
            var instance = new SpecimenContext(fixture).Resolve(testClass.Type);

            testClass.RunCases(@case => { @case.Execute(instance); });

            TestDependencyScope.End();

            instance.Dispose();
        }