package com.mssngvwls;

import static org.assertj.core.api.Assertions.assertThat;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest
public class VowelRemoverTests {

    @Autowired
    private VowelRemover vowelRemover;

    @Test
    public void lowercased_vowels_are_removed() {
        final String wordWithVowels = "united";
        final String expectedWordWithoutVowels = "ntd";
        final String actualWordWithoutVowels = vowelRemover.removeVowels(wordWithVowels);
        assertThat(actualWordWithoutVowels).isEqualTo(expectedWordWithoutVowels);
    }

    @Test
    public void uppercased_vowels_are_removed() {
        final String wordWithVowels = "United";
        final String expectedWordWithoutVowels = "ntd";
        final String actualWordWithoutVowels = vowelRemover.removeVowels(wordWithVowels);
        assertThat(actualWordWithoutVowels).isEqualTo(expectedWordWithoutVowels);
    }

    @Test
    public void empty_string_is_returned_if_phrase_is_all_vowels() {
        final String input = "AEIOUaeiou";
        final String expectedOutput = "";
        final String actualOutput = vowelRemover.removeVowels(input);
        assertThat(actualOutput).isEqualTo(expectedOutput);
    }

    @Test
    public void vowels_are_removed_from_multiple_words() {
        final String input = "Manchester United";
        final String expectedOutput = "Mnchstr ntd";
        final String actualOutput = vowelRemover.removeVowels(input);
        assertThat(actualOutput).isEqualTo(expectedOutput);
    }
}

@@ -93,20 +93,22 @@
 g.junit.
-Test
+Before
 ;%0Aimport
@@ -122,317 +122,136 @@
 nit.
-runner.RunWith;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.boot.test.context.SpringBootTest;%0Aimport org.springframework.test.context.junit4.SpringRunner;%0A%0A@RunWith(SpringRunner.class)%0A@SpringBootTest%0Apublic class VowelRemoverTests
+Test;%0A%0Apublic class VowelRemoverTests %7B%0A%0A    private VowelRemover vowelRemover;%0A%0A    @Before%0A    public void setup()
  %7B%0A
-%0A
     
-@Autowired%0A    private V
+    v
 owel
@@ -250,33 +250,39 @@
    vowelRemover 
-v
+= new V
 owelRemover;%0A%0A  
@@ -272,25 +272,33 @@
 VowelRemover
-;
+();%0A    %7D
 %0A%0A    @Test%0A

Change to be a unit test rather than integration