package core.string;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class ReplaceTest {

	@Test
	public void replaceChars() {
		String str = "Firefly".replace('f', 's');
		String exp = "Firesly";

		assertEquals(str, exp);
	}

	@Test
	public void replaceString() {
		String str = "Firefly".replace("fly", "ball");
		String exp = "Fireball";

		assertEquals(str, exp);
	}
}

@@ -158,33 +158,33 @@
 %09%09String str = %22
-F
+f
 irefly%22.replace(
@@ -210,17 +210,17 @@
  exp = %22
-F
+s
 iresly%22;
@@ -305,20 +305,19 @@
  str = %22
-Fire
+fly
 fly%22.rep
@@ -329,20 +329,20 @@
 %22fly%22, %22
-ball
+jump
 %22);%0A%09%09St
@@ -357,16 +357,16 @@
  = %22
-Fireball
+jumpjump
 %22;%0A%0A

test refactoring