Beispiel #1
0
        public void GetValidServicesTest()
        {
            var services      = new char[] { 'M', 'n', '9' };
            var validServices = DHLServicesValidator.GetValidServices(services);

            Assert.IsTrue(validServices.Count() == 2);
            Assert.IsTrue(validServices.Count(s => s == 'M') == 1);
            Assert.IsTrue(validServices.Count(s => s == 'n') == 0);
            Assert.IsTrue(validServices.Count(s => s == 'N') == 1);
            Assert.IsTrue(validServices.Count(s => s == '9') == 0);
        }
Beispiel #2
0
 public void IsServiceValidTest()
 {
     Assert.IsTrue(DHLServicesValidator.IsServiceValid('M'));
     Assert.IsTrue(DHLServicesValidator.IsServiceValid('n'));
     Assert.IsFalse(DHLServicesValidator.IsServiceValid('9'));
 }