package ru.job4j.piramid;

import org.junit.Test;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;

/**
* PiramidTest class.
* @author Yury Chuksin (chuksin.yury@gmail.com)
* @since 24.01.2017
*/
public class PiramidTest {

	/**
	* string1 1st test string.
	*/
	private String string1 = "    ^    ";

	/**
	* string2 2nd test string.
	*/
	private String string2 = "   ^^^   ";

	/**
	* string3 3rd test string.
	*/
	private String string3 = "  ^ ^ ^  ";

	/**
	* string4 4th test string.
	*/
	private String string4 = " ^  ^  ^ ";

	/**
	* string5 5th test string.
	*/
	private String string5 = "^^^^^^^^^";

	/**
	* sr line separator.
	*/
	private String sr = System.getProperty("line.separator");

	/**
	* stringTest testing result string.
	*/
	StringBuilder stringTest = new StringBuilder();
	stringTest.append(this.string1, this.sr, this.string2, this.sr, this.string3, this.sr, this.string4, this.sr, this.string5);

	/**
	* Making empty object Piramid.
	*/
	private Piramid piramid = new Piramid();

	/**
	* WhenDoBuildPiramidThenPrintsPiramid cheks is that method prints piramid in pseudographic.
	*/
	@Test
	public void whenDoBuildPiramidThenPrintsPiramid() {
		assertThat(stringTest.toString(), is(this.piramid.buildPiramid(5)));
	}
}
@@ -288,32 +288,38 @@
 g.%0A%09*/%0A%09private 
+final 
 String string1 =
@@ -371,32 +371,38 @@
 g.%0A%09*/%0A%09private 
+final 
 String string2 =
@@ -454,32 +454,38 @@
 g.%0A%09*/%0A%09private 
+final 
 String string3 =
@@ -537,32 +537,38 @@
 g.%0A%09*/%0A%09private 
+final 
 String string4 =
@@ -620,32 +620,38 @@
 g.%0A%09*/%0A%09private 
+final 
 String string5 =
@@ -705,16 +705,22 @@
 private 
+final 
 String s
@@ -780,27 +780,18 @@
 ring
-Te
+1 1
 st test
-ing result
  str
@@ -800,29 +800,36 @@
 g.%0A%09*/%0A%09
-StringBuilder
+private final String
  stringT
@@ -837,146 +837,93 @@
 st =
- new
  String
-Builder();%0A%09stringTest.append(this.string1, this.sr, this.
+.format(%22%25s%5Cr%5Cn%25s%5Cr%5Cn%25s%5Cr%5Cn%25s%5Cr%5Cn%25s%5Cr%5Cn%22, 
 string
-2, this.sr, this.string3, this.sr, this.string4, this.sr, this.
+1, string2, string3, string4, 
 stri
@@ -1202,19 +1202,8 @@
 Test
-.toString()
 , is

Correct PiramidTest task 4.3.