Пример #1
0
  @Test
  public void shouldLoadSimpleObject() {

    ObjectDOS wrapper = reader.read("anObject1{}{}");

    ObjectDOS actual = wrapper.getSlot(Symbol.get("anObject1"));

    assertThat(actual.getFunctions().size(), is(0));
    assertThat(actual.getSlots().size(), is(0));
  }
Пример #2
0
  @Test
  public void shouldLoadNestedObject() {
    ObjectDOS wrapper =
        reader.read("anObject{nestedObject{deeplyNestedObject{}{}}{}anotherNestedObject{}{}}{}");

    ObjectDOS actual = wrapper.getSlot(Symbol.get("anObject"));

    assertThat(actual.getFunctions().size(), is(0));
    assertThat(
        actual.getSlot(Symbol.get("nestedObject")).getSlot(Symbol.get("deeplyNestedObject")),
        notNullValue());
    assertThat(actual.getSlot(Symbol.get("anotherNestedObject")), notNullValue());
  }