Пример #1
0
 @Test
 public void testDescriptionNamed() {
   MetaRepository m3 = MetaRepository.createFM3();
   assertNotNull(m3.descriptionNamed("FM3.Class"));
   assertNotNull(m3.descriptionNamed("FM3.Package"));
   assertNotNull(m3.descriptionNamed("FM3.Property"));
 }
Пример #2
0
 @Test
 public void writeFile() {
   MetaRepository m3 = MetaRepository.createFM3();
   Appendable stream = new StringBuilder();
   m3.accept(new MSEPrinter(stream));
   String mse = stream.toString();
   assertTrue(mse.length() != 0);
   // out(mse);
 }
Пример #3
0
 @Test
 public void readFile() {
   MetaRepository m3 = MetaRepository.createFM3();
   StringBuilder buffer = new StringBuilder();
   m3.accept(new MSEPrinter(buffer));
   Importer builder = new Importer(m3);
   builder.readFrom(InputSource.fromString(buffer));
   Repository m2 = builder.getResult();
   m2.getElements();
 }
Пример #4
0
 @Test
 public void selfDescribed() {
   MetaRepository m3 = MetaRepository.createFM3();
   assertEquals(m3, m3.getMetamodel());
 }
Пример #5
0
 public void packageClassesIsMultivalued() {
   MetaRepository m3 = MetaRepository.createFM3();
   MetaDescription m = m3.descriptionNamed("MSE.Package");
   PropertyDescription p = m.attributeNamed("classes");
   assertEquals(true, p.isMultivalued());
 }
Пример #6
0
 @Test
 public void checkConstraints() {
   MetaRepository m3 = MetaRepository.createFM3();
   m3.checkConstraints();
 }
Пример #7
0
 @Test
 public void allClassDescriptionsAreElement() {
   MetaRepository m3 = MetaRepository.createFM3();
   assertTrue(m3.getElements().containsAll(m3.allClassDescriptions()));
 }
Пример #8
0
 @Test
 public void has20Properties() {
   MetaRepository m3 = MetaRepository.createFM3();
   assertEquals(20, m3.allPropertyDescriptions().size());
 }
Пример #9
0
 @Test
 public void has1Package() {
   MetaRepository m3 = MetaRepository.createFM3();
   assertEquals(1, m3.allPackageDescriptions().size());
 }
Пример #10
0
 @Test
 public void has4Classes() {
   MetaRepository m3 = MetaRepository.createFM3();
   assertEquals(4, m3.allClassDescriptions().size());
 }