From 08d86d5b8852cab1837a53cc2c56bb661da59499 Mon Sep 17 00:00:00 2001
From: John Crygier <john.crygier@aon.com>
Date: Mon, 07 May 2012 08:43:19 -0400
Subject: [PATCH] Make the variables / messages more consistant

---
 tests/com/gitblit/tests/RepositoryModelTest.java |   34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/tests/com/gitblit/tests/RepositoryModelTest.java b/tests/com/gitblit/tests/RepositoryModelTest.java
index 611ed29..3596c33 100644
--- a/tests/com/gitblit/tests/RepositoryModelTest.java
+++ b/tests/com/gitblit/tests/RepositoryModelTest.java
@@ -25,11 +25,11 @@
 	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 @@
 		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 @@
 		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 @@
 		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 @@
 		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 @@
 		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"));
 	}
 
 }

--
Gitblit v1.9.1