broker/test/ConfigurationClassLoaderTest: code formatter used
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
*
|
*
|
||||||
* You may elect to redistribute this code under either of these licenses.
|
* You may elect to redistribute this code under either of these licenses.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.moquette.server;
|
package io.moquette.server;
|
||||||
|
|
||||||
import io.moquette.BrokerConstants;
|
import io.moquette.BrokerConstants;
|
||||||
@@ -22,33 +23,31 @@ import io.moquette.spi.security.IAuthenticator;
|
|||||||
import io.moquette.spi.security.IAuthorizator;
|
import io.moquette.spi.security.IAuthorizator;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author luca <[email protected]>
|
* @author luca <[email protected]>
|
||||||
*/
|
*/
|
||||||
public class ConfigurationClassLoaderTest implements IAuthenticator, IAuthorizator {
|
public class ConfigurationClassLoaderTest implements IAuthenticator, IAuthorizator {
|
||||||
|
|
||||||
Server m_server;
|
Server m_server;
|
||||||
IConfig m_config;
|
IConfig m_config;
|
||||||
|
|
||||||
protected void startServer(Properties props) throws IOException {
|
protected void startServer(Properties props) throws IOException {
|
||||||
m_server = new Server();
|
m_server = new Server();
|
||||||
m_config = new MemoryConfig(props);
|
m_config = new MemoryConfig(props);
|
||||||
m_server.startServer(m_config);
|
m_server.startServer(m_config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@After
|
@After
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
m_server.stopServer();
|
m_server.stopServer();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void loadAuthenticator() throws Exception {
|
public void loadAuthenticator() throws Exception {
|
||||||
Properties props = new Properties(IntegrationUtils.prepareTestProperties());
|
Properties props = new Properties(IntegrationUtils.prepareTestProperties());
|
||||||
@@ -56,7 +55,7 @@ public class ConfigurationClassLoaderTest implements IAuthenticator, IAuthorizat
|
|||||||
startServer(props);
|
startServer(props);
|
||||||
assertTrue(true);
|
assertTrue(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void loadAuthorizator() throws Exception {
|
public void loadAuthorizator() throws Exception {
|
||||||
Properties props = new Properties(IntegrationUtils.prepareTestProperties());
|
Properties props = new Properties(IntegrationUtils.prepareTestProperties());
|
||||||
@@ -79,5 +78,5 @@ public class ConfigurationClassLoaderTest implements IAuthenticator, IAuthorizat
|
|||||||
public boolean canRead(String topic, String user, String client) {
|
public boolean canRead(String topic, String user, String client) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user