Search in sources :

Example 6 with MinoField

use of searcher.pack.mino_field.MinoField in project solution-finder by knewjade.

the class OnDemandBasicSolutionsTest method get2x4.

@Test
void get2x4() throws Exception {
    SizedBit sizedBit = new SizedBit(2, 4);
    SeparableMinos separableMinos = createSeparableMinos(sizedBit);
    Predicate<ColumnField> memorizedPredicate = columnField -> true;
    OnDemandBasicSolutions solutions = new OnDemandBasicSolutions(separableMinos, sizedBit, memorizedPredicate);
    Stream<? extends MinoField> stream = solutions.parse(ColumnFieldFactory.createField()).stream();
    assertThat(stream.count()).isEqualTo(1239L);
}
Also used : MinoShifter(core.mino.MinoShifter) Predicate(java.util.function.Predicate) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) ColumnField(core.column_field.ColumnField) Duration.ofSeconds(java.time.Duration.ofSeconds) ColumnFieldFactory(core.column_field.ColumnFieldFactory) Test(org.junit.jupiter.api.Test) SizedBit(searcher.pack.SizedBit) Stream(java.util.stream.Stream) MinoFactory(core.mino.MinoFactory) SeparableMinos(searcher.pack.SeparableMinos) Duration.ofMinutes(java.time.Duration.ofMinutes) MinoField(searcher.pack.mino_field.MinoField) Assertions.assertTimeout(org.junit.jupiter.api.Assertions.assertTimeout) SeparableMinos(searcher.pack.SeparableMinos) SizedBit(searcher.pack.SizedBit) ColumnField(core.column_field.ColumnField) Test(org.junit.jupiter.api.Test)

Aggregations

ColumnField (core.column_field.ColumnField)6 ColumnFieldFactory (core.column_field.ColumnFieldFactory)6 MinoFactory (core.mino.MinoFactory)6 MinoShifter (core.mino.MinoShifter)6 Duration.ofMinutes (java.time.Duration.ofMinutes)6 Duration.ofSeconds (java.time.Duration.ofSeconds)6 Predicate (java.util.function.Predicate)6 Stream (java.util.stream.Stream)6 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)6 Assertions.assertTimeout (org.junit.jupiter.api.Assertions.assertTimeout)6 Test (org.junit.jupiter.api.Test)6 SeparableMinos (searcher.pack.SeparableMinos)6 SizedBit (searcher.pack.SizedBit)6 MinoField (searcher.pack.mino_field.MinoField)6