Search in sources :

Example 26 with ArgumentsSource

use of org.junit.jupiter.params.provider.ArgumentsSource in project solution-finder by knewjade.

the class PathRandomPatternFileCasesTest method pattern.

@ParameterizedTest
@ArgumentsSource(PatternTestCase.class)
@LongTest
void pattern(String command, int unique, int success, int all) throws Exception {
    Log log = RunnerHelper.runnerCatchingLog(() -> EntryPointMain.main(command.split(" ")));
    assertThat(log.getOutput()).contains(Messages.pathCount(unique)).contains(Messages.success(success, all));
}
Also used : Log(_usecase.Log) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) LongTest(module.LongTest) ArgumentsSource(org.junit.jupiter.params.provider.ArgumentsSource)

Example 27 with ArgumentsSource

use of org.junit.jupiter.params.provider.ArgumentsSource in project solution-finder by knewjade.

the class PercentCountCaseTest method hold1.

@ParameterizedTest
@ArgumentsSource(Hold1TestCase.class)
@LongTest
void hold1(String command, int success, int all) throws Exception {
    Log log = RunnerHelper.runnerCatchingLog(() -> EntryPointMain.main(command.split(" ")));
    assertThat(log.getOutput()).contains(Messages.useHold()).contains(Messages.success(success, all));
}
Also used : Log(_usecase.Log) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) LongTest(module.LongTest) ArgumentsSource(org.junit.jupiter.params.provider.ArgumentsSource)

Example 28 with ArgumentsSource

use of org.junit.jupiter.params.provider.ArgumentsSource in project solution-finder by knewjade.

the class PercentCountCaseTest method hold2.

@ParameterizedTest
@ArgumentsSource(Hold2TestCase.class)
@LongTest
void hold2(String command, int success, int all) throws Exception {
    Log log = RunnerHelper.runnerCatchingLog(() -> EntryPointMain.main(command.split(" ")));
    assertThat(log.getOutput()).contains(Messages.useHold()).contains(Messages.success(success, all));
}
Also used : Log(_usecase.Log) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) LongTest(module.LongTest) ArgumentsSource(org.junit.jupiter.params.provider.ArgumentsSource)

Example 29 with ArgumentsSource

use of org.junit.jupiter.params.provider.ArgumentsSource in project solution-finder by knewjade.

the class PercentCountCaseTest method noHold1.

@ParameterizedTest
@ArgumentsSource(NoHold1TestCase.class)
@LongTest
void noHold1(String command, int success, int all) throws Exception {
    Log log = RunnerHelper.runnerCatchingLog(() -> EntryPointMain.main(command.split(" ")));
    assertThat(log.getOutput()).contains(Messages.noUseHold()).contains(Messages.success(success, all));
}
Also used : Log(_usecase.Log) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) LongTest(module.LongTest) ArgumentsSource(org.junit.jupiter.params.provider.ArgumentsSource)

Example 30 with ArgumentsSource

use of org.junit.jupiter.params.provider.ArgumentsSource in project solution-finder by knewjade.

the class PercentCountCaseTest method noHold2.

@ParameterizedTest
@ArgumentsSource(NoHold2TestCase.class)
@LongTest
void noHold2(String command, int success, int all) throws Exception {
    Log log = RunnerHelper.runnerCatchingLog(() -> EntryPointMain.main(command.split(" ")));
    assertThat(log.getOutput()).contains(Messages.noUseHold()).contains(Messages.success(success, all));
}
Also used : Log(_usecase.Log) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) LongTest(module.LongTest) ArgumentsSource(org.junit.jupiter.params.provider.ArgumentsSource)

Aggregations

ArgumentsSource (org.junit.jupiter.params.provider.ArgumentsSource)50 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)49 LoadedPatternGenerator (common.pattern.LoadedPatternGenerator)27 PatternGenerator (common.pattern.PatternGenerator)27 AnalyzeTree (common.tree.AnalyzeTree)27 LongTest (module.LongTest)16 Log (_usecase.Log)10 TestCase (com.cadenzauk.core.junit.TestCase)7 TestDatabase.testDatabase (com.cadenzauk.siesta.model.TestDatabase.testDatabase)7 Action (common.datastore.action.Action)7 Field (core.field.Field)7 UncheckedAutoCloseable (com.cadenzauk.core.lang.UncheckedAutoCloseable)6 LockedCandidate (core.action.candidate.LockedCandidate)6 Piece (core.mino.Piece)5 LockedReachable (core.action.reachable.LockedReachable)4 RandomValues.randomZonedDateTime (com.cadenzauk.core.RandomValues.randomZonedDateTime)3 TestRow (com.cadenzauk.siesta.model.TestRow)3 MinoFactory (core.mino.MinoFactory)3 MinoShifter (core.mino.MinoShifter)3 MinoRotation (core.srs.MinoRotation)3