use of com.enonic.xp.schema.mixin.Mixin in project xp by enonic.
the class MixinServiceImplTest method testApplications.
@Test
public void testApplications() {
initializeApps();
final Mixins types1 = this.service.getAll();
assertNotNull(types1);
assertEquals(8, types1.getSize());
final Mixins types2 = this.service.getByApplication(ApplicationKey.from("myapp1"));
assertNotNull(types2);
assertEquals(2, types2.getSize());
final Mixins types3 = this.service.getByApplication(ApplicationKey.from("myapp2"));
assertNotNull(types3);
assertEquals(6, types3.getSize());
final Mixin mixin = service.getByName(MixinName.from("myapp2:mixin1"));
assertNotNull(mixin);
}
use of com.enonic.xp.schema.mixin.Mixin in project xp by enonic.
the class XmlMixinParserTest method assertResult.
private void assertResult() throws Exception {
final Mixin result = this.builder.build();
assertEquals("myapplication:mymixin", result.getName().toString());
assertEquals("display name", result.getDisplayName());
assertEquals("key.display-name", result.getDisplayNameI18nKey());
assertEquals("description", result.getDescription());
assertEquals("key.description", result.getDescriptionI18nKey());
assertEquals(1, result.getForm().size());
}
Aggregations