public void SetUp() { _orderedOperations = new List <KeyValuePair <TestEntity, Operation> >(); _fixture = new Fixture().Customize(new AutoFakeItEasyCustomization()); _storeWriter = MockStoreWriter(); _sut = _fixture.Freeze <BestEffortUnitOfWork>(); _sut.RegisterStoreFor <TestEntity>(_storeWriter); _rawEntity = new TestEntity(); }
/// <summary> /// Override to explicitly `Freeze()` any necessary dependencies prior to the `Sut` being allocated. /// </summary> /// <param name="fixture"></param> protected override void FreezeDependencies(IFixture fixture) { TestTableNamePrefix = $"TEST{Guid.NewGuid().ToString().Replace("-", string.Empty)}" .ToUpperInvariant(); fixture.Inject <IAzureTableStoreFactory>(new AzureTableStoreFactory()); UnitOfWork = new BestEffortUnitOfWork(); fixture.Inject <IBestEffortUnitOfWork>(UnitOfWork); PrepareDependenciesForContext(TheFixture); Context = fixture.Freeze <TContext>(); }