First attempt at spring boot autoconfiguration
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package be.seeseemelk.llamascript;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.ValueSource;
|
||||
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
public class BooleanTests extends AbstractLlamaTest {
|
||||
@ParameterizedTest
|
||||
@ValueSource(ints = {0, 1, 2, 3, 4, 5})
|
||||
void isEven(int number) {
|
||||
boolean isEven = llama.evalBool("Return true if the number is even", number);
|
||||
assertThat(isEven, equalTo(number % 2 == 0));
|
||||
}
|
||||
|
||||
@Test
|
||||
void isABuilding() {
|
||||
boolean isBuilding = llama.evalBool("Return true if the argument is a building or skyscraper", "Dalai Lama");
|
||||
assertThat(isBuilding, equalTo(false));
|
||||
|
||||
isBuilding = llama.evalBool("Return true if the argument is a building or skyscraper", "Burj Khalifa");
|
||||
assertThat(isBuilding, equalTo(true));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user