public void TestEmergency()
        {
            ShortNumberUtil shortUtil        = new ShortNumberUtil(phoneNumberUtil);
            int             wrongTypeCounter = 0;

            foreach (var regionCode in phoneNumberUtil.GetSupportedRegions())
            {
                PhoneNumberDesc desc =
                    phoneNumberUtil.GetMetadataForRegion(regionCode).Emergency;
                if (desc.HasExampleNumber)
                {
                    String exampleNumber = desc.ExampleNumber;
                    if (!new PhoneRegex(desc.PossibleNumberPattern).MatchAll(exampleNumber).Success ||
                        !shortUtil.IsEmergencyNumber(exampleNumber, regionCode))
                    {
                        wrongTypeCounter++;
                        // LOGGER.log(Level.SEVERE, "Emergency example number Test failed for " + regionCode);
                    }
                }
            }
            Assert.Equal(0, wrongTypeCounter);
        }
 public void testIsEmergencyNumber_US()
 {
     Assert.IsTrue(shortUtil.IsEmergencyNumber("911", RegionCode.US));
     Assert.IsTrue(shortUtil.IsEmergencyNumber("119", RegionCode.US));
     Assert.IsFalse(shortUtil.IsEmergencyNumber("999", RegionCode.US));
 }
 public void TestEmergency()
 {
     ShortNumberUtil shortUtil = new ShortNumberUtil(phoneNumberUtil);
     int wrongTypeCounter = 0;
     foreach(var regionCode in phoneNumberUtil.GetSupportedRegions())
     {
         PhoneNumberDesc desc =
             phoneNumberUtil.GetMetadataForRegion(regionCode).Emergency;
         if (desc.HasExampleNumber)
         {
             String exampleNumber = desc.ExampleNumber;
             if (!new PhoneRegex(desc.PossibleNumberPattern).MatchAll(exampleNumber).Success ||
                 !shortUtil.IsEmergencyNumber(exampleNumber, regionCode))
             {
                 wrongTypeCounter++;
             // LOGGER.log(Level.SEVERE, "Emergency example number test failed for " + regionCode);
             }
         }
     }
     Assert.AreEqual(0, wrongTypeCounter);
 }