package CH.ifa.draw.standard;

import org.junit.jupiter.api.Test;

import de.renew.draw.storables.ontology.Drawing;
import de.renew.draw.ui.api.EditorApi;
import de.renew.draw.ui.ontology.DrawingView;
import de.renew.windowmanagement.Workbench;

import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.mock;

class StandardDrawingEditorTest {

    @Test
    void testGetViewForNotLoadedDrawing() {
        //given
        StandardDrawingEditor sde = new StandardDrawingEditor(mock(Workbench.class));
        //when
        DrawingView testView = sde.getView(mock(Drawing.class));
        //then
        assertTrue(testView == null || testView == EditorApi.getNullDrawingView());
    }
}