package de.renew.formalism;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.junit.jupiter.MockitoExtension;

import de.renew.formalism.java.JavaNetCompiler;
import de.renew.formalism.java.SingleJavaNetCompiler;
import de.renew.shadowcompiler.ShadowCompiler;

import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;



@ExtendWith(MockitoExtension.class)
public class JavaNetCompilerTest {
    @Test
    public void testJavaNetCompiler() {
        //when
        final JavaNetCompiler testee = new JavaNetCompiler();
        //then
        assertNotNull(testee);
    }

    @Test
    public void testCreateCompiler() {
        //given
        final JavaNetCompiler testee = new JavaNetCompiler(false, true, true);
        //when
        final ShadowCompiler result = testee.createCompiler();
        //then
        assertTrue(result instanceof SingleJavaNetCompiler);
        assertNotNull(result);

    }



}