msa tests: JUnit4 org.junit.Assert replaced with assertJ
This commit is contained in:
		
							parent
							
								
									5a8bded35f
								
							
						
					
					
						commit
						316305aea8
					
				@ -19,7 +19,6 @@ import lombok.extern.slf4j.Slf4j;
 | 
			
		||||
import org.apache.commons.io.IOUtils;
 | 
			
		||||
import org.eclipse.leshan.client.object.Security;
 | 
			
		||||
import org.eclipse.leshan.core.util.Hex;
 | 
			
		||||
import org.junit.Assert;
 | 
			
		||||
import org.thingsboard.common.util.JacksonUtil;
 | 
			
		||||
import org.thingsboard.common.util.ThingsBoardThreadFactory;
 | 
			
		||||
import org.thingsboard.server.common.data.Device;
 | 
			
		||||
@ -141,7 +140,7 @@ public class AbstractLwm2mClientTest extends AbstractContainerTest{
 | 
			
		||||
                    log.warn("msa basicTestConnection update -> finishState: [{}] states: {}", finishState, lwM2MTestClient.getClientStates());
 | 
			
		||||
                    return lwM2MTestClient.getClientStates().contains(finishState) || lwM2MTestClient.getClientStates().contains(ON_UPDATE_SUCCESS);
 | 
			
		||||
                });
 | 
			
		||||
        Assert.assertTrue(lwM2MTestClient.getClientStates().containsAll(expectedStatusesRegistrationLwm2mSuccess));
 | 
			
		||||
        assertThat(lwM2MTestClient.getClientStates()).containsAll(expectedStatusesRegistrationLwm2mSuccess);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public LwM2MTestClient createNewClient(Security security,
 | 
			
		||||
 | 
			
		||||
@ -50,7 +50,6 @@ import org.eclipse.leshan.core.request.BootstrapRequest;
 | 
			
		||||
import org.eclipse.leshan.core.request.DeregisterRequest;
 | 
			
		||||
import org.eclipse.leshan.core.request.RegisterRequest;
 | 
			
		||||
import org.eclipse.leshan.core.request.UpdateRequest;
 | 
			
		||||
import org.junit.Assert;
 | 
			
		||||
import org.thingsboard.server.msa.connectivity.lwm2m.Lwm2mTestHelper.LwM2MClientState;
 | 
			
		||||
 | 
			
		||||
import java.io.IOException;
 | 
			
		||||
@ -63,6 +62,7 @@ import java.util.Map;
 | 
			
		||||
import java.util.Set;
 | 
			
		||||
import java.util.concurrent.TimeUnit;
 | 
			
		||||
 | 
			
		||||
import static org.assertj.core.api.Assertions.assertThat;
 | 
			
		||||
import static org.eclipse.californium.scandium.config.DtlsConfig.DTLS_CONNECTION_ID_LENGTH;
 | 
			
		||||
import static org.eclipse.californium.scandium.config.DtlsConfig.DTLS_RECOMMENDED_CIPHER_SUITES_ONLY;
 | 
			
		||||
import static org.eclipse.leshan.core.LwM2mId.ACCESS_CONTROL;
 | 
			
		||||
@ -107,7 +107,7 @@ public class LwM2MTestClient {
 | 
			
		||||
    private Map<LwM2MClientState, Integer> clientDtlsCid;
 | 
			
		||||
 | 
			
		||||
    public void init(Security security, int clientPort) throws InvalidDDFFileException, IOException {
 | 
			
		||||
        Assert.assertNull("client already initialized", leshanClient);
 | 
			
		||||
        assertThat(leshanClient).as("client already initialized").isNull();
 | 
			
		||||
 | 
			
		||||
        List<ObjectModel> models = new ArrayList<>();
 | 
			
		||||
        for (String resourceName : resources) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user