AtomJAXBUtils.marshal(m, element, null, os);
assertEquals(SERVICE_DOCUMENT, os.toString());
}
public void testCategories() {
AppCategories cats = new AppCategories();
cats.setHref("href");
try {
cats.setScheme("scheme");
} catch (RestException e) {
assertEquals("cannot mix inline and out-of-line categories attributes", e.getMessage());
}
cats = new AppCategories();
cats.setHref("href");
try {
cats.setFixed(AppYesNo.YES);
} catch (RestException e) {
assertEquals("cannot mix inline and out-of-line categories attributes", e.getMessage());
}
cats = new AppCategories();
cats.setScheme("scheme");
cats.setFixed(AppYesNo.YES);
try {
cats.setHref("scheme");
} catch (RestException e) {
assertEquals("cannot mix inline and out-of-line categories attributes", e.getMessage());
}
cats = new AppCategories();
cats.setHref("href");
assertFalse(cats.isInline());
cats = new AppCategories();
assertFalse(cats.isFixedSet());
cats.setFixed(AppYesNo.YES);
assertTrue(cats.isFixedSet());
}