Example #1
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);
 }
Example #2
0
        public EntityService(
            Notificator notificator,
            IFetchingRecords source,
            ICreatingRecords creator,
            IUpdatingRecords updater,
            IDeletingRecords deleter)
        {
            if (notificator == null)
            {
                throw new ArgumentNullException("notificator");
            }
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }
            if (creator == null)
            {
                throw new ArgumentNullException("creator");
            }
            if (updater == null)
            {
                throw new ArgumentNullException("updater");
            }
            if (deleter == null)
            {
                throw new ArgumentNullException("deleter");
            }

            _notificator = notificator;
            _source      = source;
            _creator     = creator;
            _updater     = updater;
            _deleter     = deleter;
        }
Example #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);
        }
 public RecordsCreator_ManyToMany()
 {
     _source = new RecordsSource(_admin, new Notificator());
     _user = A.Fake<IProvidingUser>();
     A.CallTo(() => _user.CurrentUserName()).Returns("Test");
     var executor = new DbCommandExecutor(_admin, _user);
     _creator = new RecordsCreator(_admin, executor, _user);
 }
Example #5
0
        public EntityService(
            Notificator notificator,
            IFetchingRecords source,
            ICreatingRecords creator,
            IUpdatingRecords updater,
            IDeletingRecords deleter,
            IComparingRecords comparer,
            IDescribingChanges changeDescriber,
            IHandlingFiles filesHandler,
            IValidatingEntities validator)
        {
            if (notificator == null)
            {
                throw new ArgumentNullException("notificator");
            }
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }
            if (creator == null)
            {
                throw new ArgumentNullException("creator");
            }
            if (updater == null)
            {
                throw new ArgumentNullException("updater");
            }
            if (deleter == null)
            {
                throw new ArgumentNullException("deleter");
            }
            if (comparer == null)
            {
                throw new ArgumentNullException("comparer");
            }
            if (changeDescriber == null)
            {
                throw new ArgumentNullException("changeDescriber");
            }
            if (filesHandler == null)
            {
                throw new ArgumentNullException("filesHandler");
            }
            if (validator == null)
            {
                throw new ArgumentNullException("validator");
            }

            _notificator     = notificator;
            _source          = source;
            _creator         = creator;
            _updater         = updater;
            _deleter         = deleter;
            _comparer        = comparer;
            _changeDescriber = changeDescriber;
            _filesHandler    = filesHandler;
            _validator       = validator;
        }
        public RecordsCreator_ManyToMany()
        {
            _source = new RecordsSource(_admin, new Notificator());
            _user   = A.Fake <IProvidingUser>();
            A.CallTo(() => _user.CurrentUserName()).Returns("Test");
            var executor = new DbCommandExecutor(_admin, _user);

            _creator = new RecordsCreator(_admin, executor, _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 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 EntityService(
            Notificator notificator,
            IFetchingRecords source,
            ICreatingRecords creator,
            IUpdatingRecords updater,
            IDeletingRecords deleter,
            IComparingRecords comparer,
            IDescribingChanges changeDescriber,
            IHandlingFiles filesHandler,
            IValidatingEntities validator)
        {
            if (notificator == null)
                throw new ArgumentNullException("notificator");
            if (source == null)
                throw new ArgumentNullException("source");
            if (creator == null)
                throw new ArgumentNullException("creator");
            if (updater == null)
                throw new ArgumentNullException("updater");
            if (deleter == null)
                throw new ArgumentNullException("deleter");
            if (comparer == null)
                throw new ArgumentNullException("comparer");
            if (changeDescriber == null)
                throw new ArgumentNullException("changeDescriber");
            if (filesHandler == null)
                throw new ArgumentNullException("filesHandler");
            if (validator == null)
                throw new ArgumentNullException("validator");

            _notificator = notificator;
            _source = source;
            _creator = creator;
            _updater = updater;
            _deleter = deleter;
            _comparer = comparer;
            _changeDescriber = changeDescriber;
            _filesHandler = filesHandler;
            _validator = validator;
        }
Example #10
0
        public EntityService(
            Notificator notificator,
            IFetchingRecords source,
            ICreatingRecords creator,
            IUpdatingRecords updater,
            IDeletingRecords deleter)
        {
            if (notificator == null)
                throw new ArgumentNullException("notificator");
            if (source == null)
                throw new ArgumentNullException("source");
            if (creator == null)
                throw new ArgumentNullException("creator");
            if (updater == null)
                throw new ArgumentNullException("updater");
            if (deleter == null)
                throw new ArgumentNullException("deleter");

            _notificator = notificator;
            _source = source;
            _creator = creator;
            _updater = updater;
            _deleter = deleter;
        }