package ru.job4j.profession;

import org.junit.Test;

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

/**
 * This class tests engineer class.
 *
 * @author Kucykh Vasily (mailto:basil135@mail.ru)
 * @version $Id$
 * @since 11.04.2017
 */
public class EngineerTest {

    /**
     * This method tests method construct.
     */
    @Test
    public void whenBobConstructTheBuildingThenConstructReturnBobConstructTheBuilding() {

        Engineer bob = new Engineer("Bob", "MSU", "engineer", 10);

        String expectedValue = "Bob construct the building";
        String actualValue = bob.construct("building");

        assertThat(actualValue, is(expectedValue));

    }

    /**
     * This method tests method destruct.
     */
    @Test
    public void whenBobDestructTheBuildingThenDestructReturnBobDestructTheBuilding() {

        Engineer bob = new Engineer("Bob", "MSU", "engineer", 10);

        String expectedValue = "Bob destruct the building";
        String actualValue = bob.destruct("building");

        assertThat(actualValue, is(expectedValue));

    }

    /**
     * This method tests method analysis.
     */
    @Test
    public void whenBobAnaliseTheBuildingThenAnalisysReturnBobAnaliseTheBuilding() {

        Engineer bob = new Engineer("Bob", "MSU", "engineer", 10);

        String expectedValue = "Bob analise the building";
        String actualValue = bob.analysis("building");

        assertThat(actualValue, is(expectedValue));

    }

}

@@ -569,32 +569,28 @@
 nstruct the 
-building
+home
 %22;%0A        S
@@ -619,34 +619,44 @@
 b.construct(
-%22b
+new B
 uilding
-%22
+(%22home%22)
 );%0A%0A        
@@ -976,32 +976,28 @@
 estruct the 
-building
+home
 %22;%0A        S
@@ -1029,26 +1029,36 @@
 estruct(
-%22b
+new B
 uilding
-%22
+(%22home%22)
 );%0A%0A    
@@ -1383,24 +1383,20 @@
 ise the 
-building
+home
 %22;%0A     
@@ -1436,18 +1436,28 @@
 sis(
-%22b
+new B
 uilding
-%22
+(%22home%22)
 );%0A%0A

Refactor EngineerTest.java