summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJohn Crygier <john.crygier@aon.com>2012-05-07 07:43:19 -0500
committerJohn Crygier <john.crygier@aon.com>2012-05-07 07:43:19 -0500
commit08d86d5b8852cab1837a53cc2c56bb661da59499 (patch)
treebee71185f21dfc39e605ff78c7e2315f0cfa6097 /tests
parentef4a4558ee259e64b1038b69505556a248eeb775 (diff)
downloadgitblit-08d86d5b8852cab1837a53cc2c56bb661da59499.tar.gz
gitblit-08d86d5b8852cab1837a53cc2c56bb661da59499.zip
Make the variables / messages more consistant
Diffstat (limited to 'tests')
-rw-r--r--tests/com/gitblit/tests/RepositoryModelTest.java34
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/com/gitblit/tests/RepositoryModelTest.java b/tests/com/gitblit/tests/RepositoryModelTest.java
index 611ed295..3596c333 100644
--- a/tests/com/gitblit/tests/RepositoryModelTest.java
+++ b/tests/com/gitblit/tests/RepositoryModelTest.java
@@ -25,11 +25,11 @@ public class RepositoryModelTest {
public static void startGitBlit() throws Exception {
wasStarted = GitBlitSuite.startGitblit() == false;
- oldSection = Constants.CUSTOM_DEFINED_PROP_SECTION;
- oldSubSection = Constants.CUSTOM_DEFINED_PROP_SUBSECTION;
+ oldSection = Constants.CUSTOM_FIELDS_PROP_SECTION;
+ oldSubSection = Constants.CUSTOM_FIELDS_PROP_SUBSECTION;
- Constants.CUSTOM_DEFINED_PROP_SECTION = "RepositoryModelTest";
- Constants.CUSTOM_DEFINED_PROP_SUBSECTION = "RepositoryModelTestSubSection";
+ Constants.CUSTOM_FIELDS_PROP_SECTION = "RepositoryModelTest";
+ Constants.CUSTOM_FIELDS_PROP_SUBSECTION = "RepositoryModelTestSubSection";
}
@AfterClass
@@ -37,8 +37,8 @@ public class RepositoryModelTest {
if (wasStarted == false)
GitBlitSuite.stopGitblit();
- Constants.CUSTOM_DEFINED_PROP_SECTION = oldSection;
- Constants.CUSTOM_DEFINED_PROP_SUBSECTION = oldSubSection;
+ Constants.CUSTOM_FIELDS_PROP_SECTION = oldSection;
+ Constants.CUSTOM_FIELDS_PROP_SUBSECTION = oldSubSection;
}
@Before
@@ -46,9 +46,9 @@ public class RepositoryModelTest {
Repository r = GitBlitSuite.getHelloworldRepository();
StoredConfig config = JGitUtils.readConfig(r);
- config.unsetSection(Constants.CUSTOM_DEFINED_PROP_SECTION, Constants.CUSTOM_DEFINED_PROP_SUBSECTION);
- config.setString(Constants.CUSTOM_DEFINED_PROP_SECTION, Constants.CUSTOM_DEFINED_PROP_SUBSECTION, "commitMessageRegEx", "\\d");
- config.setString(Constants.CUSTOM_DEFINED_PROP_SECTION, Constants.CUSTOM_DEFINED_PROP_SUBSECTION, "anotherProperty", "Hello");
+ config.unsetSection(Constants.CUSTOM_FIELDS_PROP_SECTION, Constants.CUSTOM_FIELDS_PROP_SUBSECTION);
+ config.setString(Constants.CUSTOM_FIELDS_PROP_SECTION, Constants.CUSTOM_FIELDS_PROP_SUBSECTION, "commitMessageRegEx", "\\d");
+ config.setString(Constants.CUSTOM_FIELDS_PROP_SECTION, Constants.CUSTOM_FIELDS_PROP_SUBSECTION, "anotherProperty", "Hello");
config.save();
}
@@ -58,7 +58,7 @@ public class RepositoryModelTest {
Repository r = GitBlitSuite.getHelloworldRepository();
StoredConfig config = JGitUtils.readConfig(r);
- config.unsetSection(Constants.CUSTOM_DEFINED_PROP_SECTION, Constants.CUSTOM_DEFINED_PROP_SUBSECTION);
+ config.unsetSection(Constants.CUSTOM_FIELDS_PROP_SECTION, Constants.CUSTOM_FIELDS_PROP_SUBSECTION);
config.save();
}
@@ -67,8 +67,8 @@ public class RepositoryModelTest {
RepositoryModel model = GitBlit.self().getRepositoryModel(
GitBlitSuite.getHelloworldRepository().getDirectory().getName());
- assertEquals("\\d", model.customDefinedProperties.get("commitMessageRegEx"));
- assertEquals("Hello", model.customDefinedProperties.get("anotherProperty"));
+ assertEquals("\\d", model.customFields.get("commitMessageRegEx"));
+ assertEquals("Hello", model.customFields.get("anotherProperty"));
}
@Test
@@ -76,17 +76,17 @@ public class RepositoryModelTest {
RepositoryModel model = GitBlit.self().getRepositoryModel(
GitBlitSuite.getHelloworldRepository().getDirectory().getName());
- assertEquals("\\d", model.customDefinedProperties.get("commitMessageRegEx"));
- assertEquals("Hello", model.customDefinedProperties.get("anotherProperty"));
+ assertEquals("\\d", model.customFields.get("commitMessageRegEx"));
+ assertEquals("Hello", model.customFields.get("anotherProperty"));
- assertEquals("Hello", model.customDefinedProperties.put("anotherProperty", "GoodBye"));
+ assertEquals("Hello", model.customFields.put("anotherProperty", "GoodBye"));
GitBlit.self().updateRepositoryModel(model.name, model, false);
model = GitBlit.self().getRepositoryModel(
GitBlitSuite.getHelloworldRepository().getDirectory().getName());
- assertEquals("\\d", model.customDefinedProperties.get("commitMessageRegEx"));
- assertEquals("GoodBye", model.customDefinedProperties.get("anotherProperty"));
+ assertEquals("\\d", model.customFields.get("commitMessageRegEx"));
+ assertEquals("GoodBye", model.customFields.get("anotherProperty"));
}
}