First attempt at spring boot autoconfiguration

This commit is contained in:
2024-08-20 20:25:25 +02:00
parent e051ca803c
commit 3ccc0dd265
20 changed files with 247 additions and 25 deletions

View File

@@ -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));
}
}