Example #1
0
 public BaseApiController(
     IManagerStore managerStore,
     ICrudManager <TModel> manager)
     : base(managerStore)
 {
     _manager = manager;
 }
Example #2
0
        public void CanOverrideNonExisting()
        {
            IManagerStore dictionary = GetManagerStore();

            dictionary.AddOrOverride(GetManager());

            Assert.AreEqual(1, dictionary.Count);
        }
Example #3
0
        public void AddManagerByType()
        {
            IManagerStore managerStore = GetManagerStore();

            managerStore.Add(GetManager());

            Assert.IsTrue(managerStore.Contains <WebServiceDriverManager>());
        }
Example #4
0
        public void AddIncrementCount()
        {
            IManagerStore dictionary = GetManagerStore();

            dictionary.Add(GetManager());

            Assert.AreEqual(1, dictionary.Count);
        }
Example #5
0
 public ProjectManager(
     IApplicationUnitOfWork unitOfWork,
     IObjectMapper objectMapper,
     IConfigurationProvider configurationProvider, ILogManager logger, IManagerStore store)
     : base(unitOfWork, unitOfWork.Projects, objectMapper, configurationProvider, logger)
 {
     _store = store;
 }
Example #6
0
        public void ThrowDriverAlreadyExist()
        {
            IManagerStore dictionary = GetManagerStore();

            dictionary.Add(GetManager());
            dictionary.Add(GetManager());

            Assert.Fail("Previous line should have failed the test.");
        }
Example #7
0
        public void AddNamedAndUnnamed()
        {
            IManagerStore dictionary = GetManagerStore();

            dictionary.Add(string.Empty, GetManager());
            dictionary.Add(GetManager());

            Assert.AreEqual(2, dictionary.Count);
        }
Example #8
0
        public void ClearRemovesAll()
        {
            IManagerStore dictionary = GetManagerStore();

            dictionary.Add(GetManager());
            dictionary.Add(string.Empty, GetManager());
            dictionary.Clear();

            Assert.AreEqual(0, dictionary.Count);
        }
Example #9
0
        public void RemoveByName()
        {
            IManagerStore dictionary    = GetManagerStore();
            DriverManager managerToKeep = GetManager();

            dictionary.Add(managerToKeep);
            dictionary.Add(string.Empty, GetManager());
            dictionary.Remove(string.Empty);

            Assert.AreEqual(((WebServiceDriverManager)managerToKeep).Get(), dictionary.GetDriver <EventFiringWebServiceDriver, WebServiceDriverManager>());
        }
Example #10
0
        public void RemoveByType()
        {
            IManagerStore managerStore  = GetManagerStore();
            DriverManager managerToKeep = GetManager();

            managerStore.Add(GetManager());
            managerStore.Add(string.Empty, managerToKeep);
            managerStore.Remove <WebServiceDriverManager>();

            Assert.AreEqual(managerToKeep, managerStore.GetManager(string.Empty));
        }
Example #11
0
        public void ManagersMap()
        {
            IManagerStore managerStore   = GetManagerStore();
            DriverManager managerToKeep  = GetManager();
            DriverManager managerToKeep2 = GetManager();

            managerStore.Add(managerToKeep);
            managerStore.Add(string.Empty, managerToKeep2);

            Assert.AreEqual(((WebServiceDriverManager)managerToKeep).Get(), managerStore.GetDriver <EventFiringWebServiceDriver, WebServiceDriverManager>());
            Assert.AreEqual(managerToKeep2, managerStore.GetManager(string.Empty));
        }
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (ManagerStore != null)
                {
                    ManagerStore.Dispose();
                    ManagerStore = null;
                }
            }

            base.Dispose(disposing);
        }
 public UserProjectController(IManagerStore managerStore)
     : base(managerStore)
 {
 }
Example #14
0
        public void EmptyCountZero()
        {
            IManagerStore dictionary = GetManagerStore();

            Assert.AreEqual(0, dictionary.Count);
        }
Example #15
0
 public ResetTicketController(IManagerStore managerStore)
     : base(managerStore, managerStore.ResetTicketManager)
 {
 }
Example #16
0
 public CompanyRegistrationController(IManagerStore managerStore)
     : base(managerStore)
 {
 }
Example #17
0
 public ActivityController(IManagerStore managerStore)
     : base(managerStore, managerStore.ActivityManager)
 {
 }
 public BaseApiController(IManagerStore managerStore)
 {
     ManagerStore = managerStore;
 }
 public CrudApiController(IManagerStore managerStore, ICrudManager <TModel> manager)
     : base(managerStore, manager)
 {
 }
 public UserController(IManagerStore managerStore)
     : base(managerStore, managerStore.UserManager)
 {
 }
Example #21
0
 public TimeEntryController(IManagerStore managerStore)
     : base(managerStore, managerStore.TimeEntryManager)
 {
 }
 public CustomerController(IManagerStore managerStore)
     : base(managerStore, managerStore.CustomerManager)
 {
 }
Example #23
0
 public ProjectController(IManagerStore managerStore)
     : base(managerStore, managerStore.ProjectManager)
 {
 }