package com.insightfullogic.java8.test.chapter6;

import static org.junit.Assert.*;

import java.util.stream.IntStream;

import org.junit.Test;

import com.insightfullogic.java8.answers.chapter6.SerialToParallel;

public class SerialToParallelTest {

	@Test
	public void testSerialToParalleTest() {
		assertEquals(328350, SerialToParallel.sequentialSumOfSquares(IntStream.range(0, 100)));
		assertEquals(328350, SerialToParallel.sumOfSquares(IntStream.range(0, 100)));
	}
}

@@ -481,12 +481,262 @@
 ));%0D%0A%09%7D%0D
+%0A%0D%0A%09@Test%0D%0A%09public void test1() %7B%0D%0A%09%09assertEquals(2646700, SerialToParallel.sequentialSumOfSquares(IntStream.range(0, 200)));%0D%0A%09%7D%0D%0A%0D%0A%09@Test%0D%0A%09public void test2() %7B%0D%0A%09%09assertEquals(2646700, SerialToParallel.sumOfSquares(IntStream.range(0, 200)));%0D%0A%09%7D%0D
 %0A%7D%0D%0A

add test1 and test2 for test Parallel advantage in time