PageRenderTime 20ms CodeModel.GetById 18ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/simulatest-spring/src/test/java/org/simulatest/springrunner/test/example/mock/DatabaseMock.java

http://github.com/gabrielsuch/simulatest
Java | 22 lines | 15 code | 7 blank | 0 comment | 0 complexity | 38b67a0f9c08efd0fdf1a7a38a070fc9 MD5 | raw file
 1package org.simulatest.springrunner.test.example.mock;
 2
 3import java.util.ArrayList;
 4import java.util.Collections;
 5import java.util.List;
 6
 7import org.springframework.stereotype.Component;
 8
 9@Component
10public class DatabaseMock {
11	
12	private List<String> messages = new ArrayList<String>();
13
14	public void addMessage(String message) {
15		messages.add(message);
16	}
17
18	public List<String> getMessages() {
19		return Collections.unmodifiableList(messages);
20	}
21
22}