-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathManyTest.java
More file actions
36 lines (30 loc) · 815 Bytes
/
Copy pathManyTest.java
File metadata and controls
36 lines (30 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package rabbitmq;
import com.fancv.RabbitMQApplication;
import com.fancv.rabbit.many.NeoSender;
import com.fancv.rabbit.many.NeoSender2;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = RabbitMQApplication.class)
public class ManyTest {
@Autowired
private NeoSender neoSender;
@Autowired
private NeoSender2 neoSender2;
@Test
public void oneToMany() throws Exception {
for (int i=0;i<100;i++){
neoSender.send(i);
}
}
@Test
public void manyToMany() throws Exception {
for (int i=0;i<100;i++){
neoSender.send(i);
neoSender2.send(i);
}
}
}