예제 #1
0
        public DbCommandExecutor(IProvidingUser user)
        {
            if (user == null)
                throw new ArgumentNullException("user");

            _user = user;
        }
예제 #2
0
        public RecordsUpdater(
            IIlaroAdmin admin,
            IExecutingDbCommand executor,
            IFetchingRecords source,
            IProvidingUser user)
        {
            if (admin == null)
            {
                throw new ArgumentNullException(nameof(admin));
            }
            if (executor == null)
            {
                throw new ArgumentNullException(nameof(executor));
            }
            if (source == null)
            {
                throw new ArgumentNullException(nameof(source));
            }
            if (user == null)
            {
                throw new ArgumentNullException(nameof(user));
            }

            _admin    = admin;
            _executor = executor;
            _source   = source;
            _user     = user;
        }
예제 #3
0
 public RecordsCreator_()
 {
     _user = A.Fake<IProvidingUser>();
     A.CallTo(() => _user.CurrentUserName()).Returns("Test");
     var executor = new DbCommandExecutor(_admin, _user);
     _creator = new RecordsCreator(_admin, executor, _user);
 }
예제 #4
0
        public RecordsCreator_()
        {
            _user = A.Fake <IProvidingUser>();
            A.CallTo(() => _user.CurrentUserName()).Returns("Test");
            var executor = new DbCommandExecutor(_admin, _user);

            _creator = new RecordsCreator(_admin, executor, _user);
        }
예제 #5
0
 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 RecordsUpdater_ManyToMany()
        {
            _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);
        }
예제 #7
0
        public DbCommandExecutor(IProvidingUser user)
        {
            if (user == null)
            {
                throw new ArgumentNullException("user");
            }

            _user = user;
        }
예제 #8
0
        public DbCommandExecutor(IIlaroAdmin admin, IProvidingUser user)
        {
            if (admin == null)
                throw new ArgumentNullException(nameof(admin));
            if (user == null)
                throw new ArgumentNullException(nameof(user));

            _admin = admin;
            _user = user;
        }
예제 #9
0
        public RecordsDeleter_()
        {
            _user = A.Fake <IProvidingUser>();
            A.CallTo(() => _user.CurrentUserName()).Returns("Test");
            var executor = new DbCommandExecutor(_admin, _user);

            _hierarchySource = new RecordsHierarchySource(_admin);
            _deleter         = new RecordsDeleter(_admin, executor, _hierarchySource, _user);
            _source          = new RecordsSource(_admin, new Notificator());
        }
예제 #10
0
        public FilterFactory(IProvidingUser user, IKnowTheTime clock)
        {
            if (user == null)
                throw new ArgumentNullException(nameof(user));
            if (clock == null)
                throw new ArgumentNullException(nameof(clock));

            _user = user;
            _clock = clock;
        }
예제 #11
0
 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");
 }
예제 #12
0
        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");
        }
예제 #13
0
        public DbCommandExecutor(IIlaroAdmin admin, IProvidingUser user)
        {
            if (admin == null)
            {
                throw new ArgumentNullException(nameof(admin));
            }
            if (user == null)
            {
                throw new ArgumentNullException(nameof(user));
            }

            _admin = admin;
            _user  = user;
        }
예제 #14
0
        public FilterFactory(IProvidingUser user, IKnowTheTime clock)
        {
            if (user == null)
            {
                throw new ArgumentNullException(nameof(user));
            }
            if (clock == null)
            {
                throw new ArgumentNullException(nameof(clock));
            }

            _user  = user;
            _clock = clock;
        }
예제 #15
0
        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());
        }
예제 #16
0
        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());
        }
예제 #17
0
        public RecordsCreator(
            IIlaroAdmin admin,
            IExecutingDbCommand executor,
            IProvidingUser user)
        {
            if (admin == null)
                throw new ArgumentNullException(nameof(admin));
            if (executor == null)
                throw new ArgumentNullException(nameof(executor));
            if (user == null)
                throw new ArgumentNullException(nameof(user));

            _admin = admin;
            _executor = executor;
            _user = user;
        }
예제 #18
0
        public RecordsUpdater(
            IIlaroAdmin admin,
            IExecutingDbCommand executor,
            IFetchingRecords source,
            IProvidingUser user)
        {
            if (admin == null)
                throw new ArgumentNullException(nameof(admin));
            if (executor == null)
                throw new ArgumentNullException(nameof(executor));
            if (source == null)
                throw new ArgumentNullException(nameof(source));
            if (user == null)
                throw new ArgumentNullException(nameof(user));

            _admin = admin;
            _executor = executor;
            _source = source;
            _user = user;
        }
예제 #19
0
        public RecordsCreator(
            IIlaroAdmin admin,
            IExecutingDbCommand executor,
            IProvidingUser user)
        {
            if (admin == null)
            {
                throw new ArgumentNullException(nameof(admin));
            }
            if (executor == null)
            {
                throw new ArgumentNullException(nameof(executor));
            }
            if (user == null)
            {
                throw new ArgumentNullException(nameof(user));
            }

            _admin    = admin;
            _executor = executor;
            _user     = user;
        }