public void DoesCultureExistTest() { Assert.IsTrue(ResourceBundleValidator.CultureExists("en")); Assert.IsTrue(ResourceBundleValidator.CultureExists("en-US")); Assert.IsTrue(ResourceBundleValidator.CultureExists("nl")); Assert.IsTrue(ResourceBundleValidator.CultureExists("nl-NL")); Assert.IsTrue(ResourceBundleValidator.CultureExists("nl-BE")); Assert.IsTrue(ResourceBundleValidator.CultureExists("fr-BE")); }
public bool Validate(KeysLastReleaseTeksArgs args) { if (args == null) { return(false); } if (!ResourceBundleValidator.IsBase64(args.BucketId)) { return(false); } if (_Config.TemporaryExposureKeyCountMin > args.Keys.Length || args.Keys.Length > _Config.TemporaryExposureKeyCountMax) { return(false); } return(args.Keys.All(_TemporaryExposureKeyValidator.Valid)); }
public void IsBase64Test() { var thing = Convert.ToBase64String(Encoding.UTF8.GetBytes("Klingons off the starboard bow!")); Assert.IsTrue(ResourceBundleValidator.IsBase64(thing)); }