plantuml/test/net/sourceforge/plantuml/tim/stdlib/GetAllStdlibTest.java

38 lines
1.3 KiB
Java

package net.sourceforge.plantuml.tim.stdlib;
import static org.assertj.core.api.Assertions.assertThat;
import java.util.Arrays;
import java.util.Collections;
import org.junit.jupiter.api.DisplayNameGenerator.ReplaceUnderscores;
import org.junit.jupiter.api.IndicativeSentencesGeneration;
import org.junit.jupiter.api.Test;
import net.sourceforge.plantuml.tim.EaterException;
import net.sourceforge.plantuml.tim.EaterExceptionLocated;
import net.sourceforge.plantuml.tim.TFunction;
import net.sourceforge.plantuml.tim.expression.TValue;
/**
* Tests the builtin function.
*/
@IndicativeSentencesGeneration(separator = ": ", generator = ReplaceUnderscores.class)
class GetAllStdlibTest {
TFunction cut = new GetAllStdlib();
final String cutName = "GetAllStdlib";
@Test
void Test_without_Param() throws EaterException, EaterExceptionLocated {
final TValue tValue = cut.executeReturnFunction(null, null, null, Collections.emptyList(), null);
assertThat(tValue.toString()).contains("archimate", "aws", "tupadr3");
}
@Test
void Test_with_one_argument() throws EaterException, EaterExceptionLocated {
final TValue tValue = cut.executeReturnFunction(null, null, null, Arrays.asList(TValue.fromInt(0)), null);
assertThat(tValue.toString()).contains("archimate", "https://github.com/plantuml-stdlib/Archimate-PlantUML");
}
}