package org.openlegacy.recognizers;
import apps.inventory.screens.MainMenu;
import apps.inventory.screens.SignOn;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openlegacy.AbstractTest;
import org.openlegacy.terminal.TerminalSession;
import org.openlegacy.terminal.actions.TerminalActions;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import java.io.IOException;
@ContextConfiguration("/test-mock-context.xml")
@RunWith(SpringJUnit4ClassRunner.class)
public class RegistryBasedScreensRecognizerTest extends AbstractTest {
@Test
public void testScreenRecognizer() throws IOException {
TerminalSession terminalSession = newTerminalSession();
SignOn signOn = terminalSession.getEntity(SignOn.class);
Assert.assertNotNull(signOn);
terminalSession.doAction(TerminalActions.ENTER());
MainMenu mainMenu = terminalSession.getEntity(MainMenu.class);
Assert.assertNotNull(mainMenu);
}
}