Example #1
0
        public AccessCommandTest()
        {
            msi = new ManagementStorageMock();

            ManagerInfo mi = new ManagerInfo
            {
                Password = "******"
            };

            msi.UpdateConfig(mi);

            asi           = new AdminStorageMock();
            osi           = new OrderStorageMock();
            AccessCommand = new AccessCommand(msi, asi, osi);
        }
        public RemovePrintCommandTest()
        {
            msi = new ManagementStorageMock();

            ManagerInfo mi = new ManagerInfo();

            mi.Prints = new HashSet <string> {
                "123", "456", "789"
            };
            msi.UpdateConfig(mi);

            asi = new AdminStorageMock();

            asi.SetAdminAccess(777);

            osi           = new OrderStorageMock();
            AccessCommand = new RemovePrintCommand(msi, asi, osi);
        }
        public ShowPrintsCommandTest()
        {
            msi = new ManagementStorageMock();

            ManagerInfo mi = new ManagerInfo
            {
                Password = "******",
                Prints   = new HashSet <string>()
                {
                    "123", "456", "789"
                }
            };

            msi.UpdateConfig(mi);

            asi = new AdminStorageMock();

            asi.SetAdminAccess(777);

            osi           = new OrderStorageMock();
            AccessCommand = new ShowPrintsCommand(msi, asi, osi);
        }