ActorInterfaceDescriptionImpl implements ActorInterfaceDescription { @Override public void describeProblems(@NotNull List<GenerationError> errors) { errors.addAll(mErrors); } ActorInterfaceDescriptionImpl(@NotNull Element element); @Override boolean validate(); @Override void describeProblems(@NotNull List<GenerationError> errors); @NotNull @Override Iterable<? extends ActorInterfaceDescription.Method> methods(); @NotNull @Override TypeElement getType();  }
@Test public void describeProblems_ER0001_notInterface() { TypeElement element = getTypeElement(ActorClass.class); List<GenerationError> errors = new ArrayList<>(); ActorInterfaceDescriptionImpl description = new ActorInterfaceDescriptionImpl(element); description.describeProblems(errors); Assert.assertEquals(1, errors.size()); Assert.assertEquals(true, errors.get(0).isError); Assert.assertEquals(GenerationError.ER0001, errors.get(0).message); Assert.assertSame(element, errors.get(0).element); }
@Test public void describeProblems_ER0002_privateInterface() { TypeElement element = getTypeElement(PrivateActorContainer.getActorClassName()); List<GenerationError> errors = new ArrayList<>(); ActorInterfaceDescriptionImpl description = new ActorInterfaceDescriptionImpl(element); description.describeProblems(errors); Assert.assertEquals(1, errors.size()); Assert.assertEquals(true, errors.get(0).isError); Assert.assertEquals(GenerationError.ER0002, errors.get(0).message); Assert.assertSame(element, errors.get(0).element); }