use of com.thecoderscorner.menu.auth.PreDefinedAuthenticator in project tcMenu by davetcc.
the class MenuServerSocketIntegrationTest method setUp.
@BeforeEach
void setUp() throws IOException {
var executor = Executors.newScheduledThreadPool(4);
var tree = DomainFixtures.fullEspAmplifierTestTree();
var authenticator = new PreDefinedAuthenticator("4321", List.of(new AuthenticationToken("integration-client", localUuid.toString())));
serverConnection = new SocketServerConnectionManager(protocol, executor, 9876, Clock.systemDefaultZone());
menuServer = new MenuManagerServer(executor, tree, "integration-test", serverUuid, authenticator, Clock.systemDefaultZone());
menuServer.addConnectionManager(serverConnection);
clientConnector = new SocketBasedConnector(new LocalIdentifier(localUuid, "integration-client"), executor, Clock.systemDefaultZone(), protocol, "localhost", 9876, ConnectMode.FULLY_AUTHENTICATED);
clientController = new RemoteMenuController(clientConnector, new MenuTree());
treePopulatedLatch = new CountDownLatch(1);
correlationLatch = new CountDownLatch(1);
itemUpdatedLatch = new CountDownLatch(1);
}
Aggregations