Example #1
0
            public void PCManagerLoadsPolicies()
            {
                PCManager manager = PCMFactory.Create();

                List <Policy> policies = manager.GetAllPolicies().ToList();

                Assert.AreEqual(4, policies.Count);
            }
Example #2
0
            public void PCManagerCanDeletePolicy(int policyNumber)
            {
                PCManager manager = PCMFactory.Create();

                manager.DeletePolicy(policyNumber);
                List <Policy> policies = manager.GetAllPolicies().ToList();

                Assert.AreEqual(3, policies.Count);
            }
Example #3
0
            public void PCManagerCanAddPolicy(string policyName, int categoryNum, string policyContent)
            {
                PCManager manager = PCMFactory.Create();

                Policy newPolicy = new Policy();

                newPolicy.PolicyName     = policyName;
                newPolicy.PolicyCategory = categoryNum;
                newPolicy.Content        = policyContent;

                manager.AddPolicy(newPolicy);

                List <Policy> policies = manager.GetAllPolicies().ToList();

                Assert.AreEqual(5, policies.Count);
            }