broker/AuthorizationsCollectorTest: code formatter used
This commit is contained in:
@@ -13,13 +13,12 @@
|
|||||||
*
|
*
|
||||||
* 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.spi.impl.security;
|
package io.moquette.spi.impl.security;
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -28,8 +27,12 @@ import static org.junit.Assert.*;
|
|||||||
public class AuthorizationsCollectorTest {
|
public class AuthorizationsCollectorTest {
|
||||||
|
|
||||||
private static final Authorization RW_ANEMOMETER = new Authorization("/weather/italy/anemometer");
|
private static final Authorization RW_ANEMOMETER = new Authorization("/weather/italy/anemometer");
|
||||||
private static final Authorization R_ANEMOMETER = new Authorization("/weather/italy/anemometer", Authorization.Permission.READ);
|
private static final Authorization R_ANEMOMETER = new Authorization(
|
||||||
private static final Authorization W_ANEMOMETER = new Authorization("/weather/italy/anemometer", Authorization.Permission.WRITE);
|
"/weather/italy/anemometer",
|
||||||
|
Authorization.Permission.READ);
|
||||||
|
private static final Authorization W_ANEMOMETER = new Authorization(
|
||||||
|
"/weather/italy/anemometer",
|
||||||
|
Authorization.Permission.WRITE);
|
||||||
|
|
||||||
private AuthorizationsCollector authorizator;
|
private AuthorizationsCollector authorizator;
|
||||||
|
|
||||||
@@ -70,7 +73,6 @@ public class AuthorizationsCollectorTest {
|
|||||||
assertEquals(RW_ANEMOMETER, authorization);
|
assertEquals(RW_ANEMOMETER, authorization);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testParseAuthLineValid_topic_with_space() throws ParseException {
|
public void testParseAuthLineValid_topic_with_space() throws ParseException {
|
||||||
Authorization expected = new Authorization("/weather/eastern italy/anemometer");
|
Authorization expected = new Authorization("/weather/eastern italy/anemometer");
|
||||||
|
|||||||
Reference in New Issue
Block a user