@Test
public void setValue_shouldSetProperAttributableIdIfFound() {
PersonAttributeType type = new PersonAttributeType();
type.setFormat(“org.openmrs.Location”);
type.setName(“Second Home”);
type.setDescription(“Testing Attributable domain objects”);
type.setSortWeight(5.5);
type.setSearchable(false);
type = personService.savePersonAttributeType(type);
//Get the first location in from the list
Location location = locationService.getAllLocations().get(0);
PersonAttribute attribute = new PersonAttribute(type, null);
attribute.setAttributeType(type);
Assert.assertNull(attribute.getValue());
resource.setValue(attribute, location.getUuid());
Assert.assertEquals(location.getUuid(), attribute.getValue());
}
the above test in particular fails when the person attribute 1_8 resourse in transfered in to omod 1.9
i tried to compare the two omods to see if there is any differnces in the dependecies, i find non
i believe ther must be a change made in 1.9 the i need to foreseeto make this test work
oh okay
but why if we run in it omod 1.8 thethat specific test pass thats what beats my understanding
so do you suggest we modify it to match the expected result with the actual result, will that serve the purpose or we ignore the test all together @ibacher
plus just another quick one while at this issue, PersonAttributeTypeResourceWithConcept1_8Test which also is related to the PersonAttributeResource (it’s casted in BaseDelegatingResourceTest which is extend by this class). it invokes a java.lang.ClassCastException
java.lang.ClassCastException: org.openmrs.module.webservices.rest.SimpleObject cannot be cast to org.openmrs.Concept