Unit test refactor

This commit is contained in:
James Agnew 2014-12-10 15:11:32 -05:00
parent 8ac479b7bd
commit 840e004580
2 changed files with 9 additions and 8 deletions

View File

@ -21,13 +21,6 @@ public class ResourceWithExtensionsA extends BaseResource {
* so check the unit tests immediately after any changes
*/
@Child(name = "bar1", type = Bar1.class, order = 2, min = 1, max = Child.MAX_UNLIMITED)
@Extension(url = "http://bar/#b1", definedLocally=true, isModifier=false)
private List<Bar1> myBar1;
@Child(name = "bar2", type = Bar1.class, order = 3, min = 1, max = Child.MAX_UNLIMITED)
@Extension(url = "http://bar/#b2", definedLocally=true, isModifier=false)
private Bar1 myBar2;
@Child(name = "foo1", type = StringDt.class, order = 0, min = 0, max = Child.MAX_UNLIMITED)
@Extension(url = "http://foo/#f1", definedLocally=true, isModifier=false)
@ -37,6 +30,14 @@ public class ResourceWithExtensionsA extends BaseResource {
@Extension(url = "http://foo/#f2", definedLocally=true, isModifier=true)
private StringDt myFoo2;
@Child(name = "bar1", type = Bar1.class, order = 2, min = 1, max = Child.MAX_UNLIMITED)
@Extension(url = "http://bar/#b1", definedLocally=true, isModifier=false)
private List<Bar1> myBar1;
@Child(name = "bar2", type = Bar1.class, order = 3, min = 1, max = Child.MAX_UNLIMITED)
@Extension(url = "http://bar/#b2", definedLocally=true, isModifier=false)
private Bar1 myBar2;
@Child(name="baz", type = CodeableConceptDt.class, order = 4)
@Extension(url= "http://baz/#baz", definedLocally=true, isModifier=false)
@Description(shortDefinition = "Contains a codeable concept")

View File

@ -58,7 +58,7 @@ public class RuntimeResourceDefinitionTest {
Profile profile = (Profile) def.toProfile();
ourLog.info(ctx.newXmlParser().encodeResourceToString(profile));
ourLog.info(ctx.newXmlParser().setPrettyPrint(true).encodeResourceToString(profile));
List<StructureElement> element = profile.getStructure().get(0).getElement();
assertEquals(1, element.get(0).getDefinition().getType().size());