public void Init() { var currentAssemblyName = Assembly.GetExecutingAssembly().FullName; _mockAutoContextOptionsExtension = MockHelpers.CreateMockAutoContextOptionsExtension(currentAssemblyName); _mockDbContextOptions = MockHelpers.CreateMockDbContextOptions(new [] { _mockAutoContextOptionsExtension.Object }); var builder = new DbContextOptionsBuilder(); _mockCurrentDbContext = MockHelpers.CreateMockCurrentDbContext(new AutoContextBase(builder.Options)); InitSubject(); }