public void BulkInsertDataStrategyTest() { var log = A.Fake<ILog>(); var commandExecutor = A.Fake<ICommandExecutor>(); var commandFabric = A.Fake<ICommandFabric>(); var obj = new BulkInsertDataStrategy(log, commandExecutor, commandFabric); Assert.IsNotNull(obj); }
public void DisposeTest() { var log = A.Fake<ILog>(); var commandExecutor = A.Fake<ICommandExecutor>(); var commandFabric = A.Fake<ICommandFabric>(); var obj = new BulkInsertDataStrategy(log, commandExecutor, commandFabric); obj.Dispose(); A.CallTo(() => commandFabric.ClearCache()).MustHaveHappened(); }
public void ExecuteTest() { var log = A.Fake<ILog>(); var commandExecutor = A.Fake<ICommandExecutor>(); var commandFabric = A.Fake<ICommandFabric>(); var obj = new BulkInsertDataStrategy(log, commandExecutor, commandFabric); var db = new DatabaseData(); db.EntityData = new List<EntityData> { new EntityData() }; obj.Execute(db); A.CallTo(() => commandExecutor.Execute<Command>(A<Action<ICommandConfiguration<Command>>>.Ignored)).MustHaveHappened(); }