Newer
Older
RDLProofSystem / src / test / java / utils / ProductTest.java
@Sakoda2269 Sakoda2269 on 18 May 625 bytes ディレクトリ構造変更
package utils;

import static org.junit.jupiter.api.Assertions.*;

import org.junit.jupiter.api.Test;

import java.util.List;

public class ProductTest {
	
	@Test
	void product() {
		List<List<Integer>> input = List.of(
                List.of(1, 2),
                List.of(3, 4),
                List.of(5)
        );

        List<List<Integer>> result = Product.product(input);

        List<List<Integer>> expected = List.of(
                List.of(1, 3, 5),
                List.of(1, 4, 5),
                List.of(2, 3, 5),
                List.of(2, 4, 5)
        );

        assertEquals(expected, result);
	}
	
}