assertEquals(AccessRestrictionType.VIEW, AccessRestrictionType.fromName("view"));
}
@Test
public void testFileSettings() throws Exception {
FileSettings settings = new FileSettings("src/main/distrib/data/gitblit.properties");
assertEquals(true, settings.getBoolean("missing", true));
assertEquals("default", settings.getString("missing", "default"));
assertEquals(10, settings.getInteger("missing", 10));
assertEquals(5, settings.getInteger("realm.realmFile", 5));
assertTrue(settings.getBoolean("git.enableGitServlet", false));
assertEquals("${baseFolder}/users.conf", settings.getString("realm.userService", null));
assertEquals(5, settings.getInteger("realm.minPasswordLength", 0));
List<String> mdExtensions = settings.getStrings("web.markdownExtensions");
assertTrue(mdExtensions.size() > 0);
assertTrue(mdExtensions.contains("md"));
List<String> keys = settings.getAllKeys("server");
assertTrue(keys.size() > 0);
assertTrue(keys.contains("server.httpsPort"));
assertTrue(settings.getChar("web.forwardSlashCharacter", ' ') == '/');
}