Newer
Older
ResourceDependencyLogic / src / tests / utils / ProductTest.java
@Sakoda2269 Sakoda2269 on 28 Feb 638 bytes 公理による推論を実装中
package tests.utils;

import static org.junit.Assert.*;

import java.util.List;

import org.junit.jupiter.api.Test;

import utils.Product;

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