mirror of
https://github.com/Dannecron/netology-devops-teamcity-example.git
synced 2025-12-25 15:22:35 +03:00
33 lines
828 B
Java
33 lines
828 B
Java
package plaindoll;
|
|
|
|
import static org.hamcrest.CoreMatchers.containsString;
|
|
import static org.junit.Assert.*;
|
|
|
|
import org.junit.Test;
|
|
|
|
public class WelcomerTest {
|
|
|
|
private Welcomer welcomer = new Welcomer();
|
|
|
|
@Test
|
|
public void welcomerSaysWelcome() {
|
|
assertThat(welcomer.sayWelcome(), containsString("Welcome"));
|
|
}
|
|
@Test
|
|
public void welcomerSaysFarewell() {
|
|
assertThat(welcomer.sayFarewell(), containsString("Farewell"));
|
|
}
|
|
@Test
|
|
public void welcomerSaysHunter() {
|
|
assertThat(welcomer.sayWelcome(), containsString("hunter"));
|
|
assertThat(welcomer.sayFarewell(), containsString("hunter"));
|
|
}
|
|
@Test
|
|
public void welcomerSaysSilver(){
|
|
assertThat(welcomer.sayNeedGold(), containsString("gold"));
|
|
}
|
|
@Test
|
|
public void welcomerSaysSomething(){
|
|
assertThat(welcomer.saySome(), containsString("something"));
|
|
}
|
|
} |