public RecordsCreator_() { _user = A.Fake<IProvidingUser>(); A.CallTo(() => _user.CurrentUserName()).Returns("Test"); var executor = new DbCommandExecutor(_admin, _user); _creator = new RecordsCreator(_admin, executor, _user); }
public RecordsUpdater_() { _source = new RecordsSource(_admin, new Notificator()); _user = A.Fake<IProvidingUser>(); A.CallTo(() => _user.CurrentUserName()).Returns("Test"); var executor = new DbCommandExecutor(_admin, _user); _updater = new RecordsUpdater(_admin, executor, _source, _user); }
public RecordsCreator_() { _user = A.Fake<IProvidingUser>(); A.CallTo(() => _user.Current()).Returns("Test"); var executor = new DbCommandExecutor(_user); _creator = new RecordsCreator(executor); Admin.AddEntity<Product>(); Admin.SetForeignKeysReferences(); Admin.ConnectionStringName = ConnectionStringName; _entity = Admin.EntitiesTypes.FirstOrDefault(x => x.Name == "Product"); }
public RecordsUpdater_() { _source = new RecordsSource(new Notificator()); _user = A.Fake<IProvidingUser>(); A.CallTo(() => _user.Current()).Returns("Test"); var executor = new DbCommandExecutor(_user); _updater = new RecordsUpdater(executor, _source); Admin.AddEntity<Product>(); Admin.SetForeignKeysReferences(); Admin.ConnectionStringName = ConnectionStringName; _productId = DB.Products.Insert(ProductName: "Product").ProductID; _entity = _source.GetEntityWithData(Admin.GetEntity("Product"), _productId.ToString()); }