Example #1
0
        public void TestUpToDateLearner()
        {
            var action = new GetPastelStatus((learnerNumber, database) => UpToDateLearnerData);
            var result = action.PastelCheck(BFN, "100111");

            Assert.IsTrue(result.IsAllowed);
        }
Example #2
0
 public void TestUnprefixedDivision()
 {
     var action = new GetPastelStatus((learnerNumber, database) =>
     {
         Assert.AreEqual("UCOECDNIP", database);
         Assert.AreEqual("ECD123", learnerNumber);
         return UpToDateLearnerData;
     });
     action.PastelCheck(EcdDivision, "ECD123");
 }
Example #3
0
 public void TestPrefixedDivision()
 {
     var action = new GetPastelStatus((learnerNumber, database) =>
     {
         Assert.AreEqual("UNIJOINT", database);
         Assert.AreEqual("A00111", learnerNumber);
         return UpToDateLearnerData;
     });
     action.PastelCheck(BFN, "100111");
     action.PastelCheck(BFN, "A00111");
 }
Example #4
0
        private bool PastelCheck(string scanNumber)
        {
            var result = new GetPastelStatus().PastelCheck(
                division: GlobalProperties.loggedOnUserDivison,
                learnerNumber: scanNumber);

            _pastelString = result.Message;
            return result.IsAllowed;
        }