package org.realityforge.arez.processor;

import com.google.testing.compile.JavaFileObjects;
import com.google.testing.compile.JavaSourceSubjectFactory;
import javax.annotation.Nonnull;
import javax.tools.JavaFileObject;
import static com.google.common.truth.Truth.assert_;

abstract class AbstractArezProcessorTest
{
  void assertProcessor( @Nonnull final String inputResource,
                        @Nonnull final String expectedOutputResource )
  {
    final JavaFileObject source = JavaFileObjects.forResource( inputResource );
    assert_().about( JavaSourceSubjectFactory.javaSource() ).
      that( source ).
      processedWith( new ArezProcessor() ).
      compilesWithoutError().
      and().generatesSources( JavaFileObjects.forResource( expectedOutputResource ) );
  }
}

@@ -324,25 +324,260 @@
 d assert
-Processor
+SuccessfulCompile( @Nonnull final String resourceKey )%0A  %7B%0A    final String file = resourceKey.replaceAll( %22%5C%5C.%22, %22/%22 );%0A    assertSuccessfulCompile( %22input/%22 + file + %22.java%22, %22expected/%22 + file + %22.java%22 );%0A  %7D%0A%0A  void assertSuccessfulCompile
 ( @Nonnu
@@ -607,16 +607,24 @@
 source,%0A
+        
         

Rename assertProcessor => assertSuccessfulCompile and add simplified assertSuccessfulCompile that accepts single classname parameter