Stop using deprecated junit.framework.Assert class
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2013 the original author or authors.
|
* Copyright 2002-2014 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -32,10 +32,7 @@ import org.springframework.messaging.support.ExecutorSubscribableChannel;
|
|||||||
import org.springframework.messaging.support.GenericMessage;
|
import org.springframework.messaging.support.GenericMessage;
|
||||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||||
|
|
||||||
import static junit.framework.Assert.assertNull;
|
import static org.junit.Assert.*;
|
||||||
import static org.junit.Assert.assertEquals;
|
|
||||||
import static org.junit.Assert.assertTrue;
|
|
||||||
import static org.junit.Assert.fail;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unit tests for {@link GenericMessagingTemplate}.
|
* Unit tests for {@link GenericMessagingTemplate}.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2013 the original author or authors.
|
* Copyright 2002-2014 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -16,17 +16,16 @@
|
|||||||
|
|
||||||
package org.springframework.messaging.core;
|
package org.springframework.messaging.core;
|
||||||
|
|
||||||
import org.junit.Before;
|
|
||||||
import org.junit.Test;
|
|
||||||
import org.springframework.messaging.Message;
|
|
||||||
import org.springframework.messaging.support.GenericMessage;
|
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import static junit.framework.Assert.assertNotNull;
|
import org.junit.Before;
|
||||||
import static org.junit.Assert.assertEquals;
|
import org.junit.Test;
|
||||||
import static org.junit.Assert.assertSame;
|
|
||||||
|
import org.springframework.messaging.Message;
|
||||||
|
import org.springframework.messaging.support.GenericMessage;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unit tests for {@link AbstractMessageSendingTemplate}.
|
* Unit tests for {@link AbstractMessageSendingTemplate}.
|
||||||
@@ -49,7 +48,6 @@ public class MessageSendingTemplateTests {
|
|||||||
this.headers = Collections.<String, Object>singletonMap("key", "value");
|
this.headers = Collections.<String, Object>singletonMap("key", "value");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void send() {
|
public void send() {
|
||||||
Message<?> message = new GenericMessage<Object>("payload");
|
Message<?> message = new GenericMessage<Object>("payload");
|
||||||
@@ -119,7 +117,6 @@ public class MessageSendingTemplateTests {
|
|||||||
assertEquals("payload", this.template.message.getPayload());
|
assertEquals("payload", this.template.message.getPayload());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void convertAndSendPayloadWithPostProcessor() {
|
public void convertAndSendPayloadWithPostProcessor() {
|
||||||
this.template.setDefaultDestination("home");
|
this.template.setDefaultDestination("home");
|
||||||
|
|||||||
Reference in New Issue
Block a user