TrimQuotationFilter implements TrimFilter { @Override public String trimAll(String src) { if (src == null) { return null; } return src.replaceAll("\"", StringValue.Empty).replaceAll("'", StringValue.Empty); }  @Override String trimAll(String src);  }
@Test public void trimAll_A$String_null() throws Exception { TrimQuotationFilter target = new TrimQuotationFilter(); String src = null; String actual = target.trimAll(src); String expected = null; assertEquals(expected, actual); }
@Test public void trimAll_A$String_notNull() throws Exception { TrimQuotationFilter target = new TrimQuotationFilter(); String src = "sdfa\"sdfsf\'a\r\naaa\'asdfsfa\"aaa"; String actual = target.trimAll(src); String expected = "sdfasdfsfa\r\naaaasdfsfaaaa"; assertEquals(expected, actual); }
@Test public void trimAll_A$String_StringIsNull() throws Exception { TrimQuotationFilter target = new TrimQuotationFilter(); String src = null; String actual = target.trimAll(src); String expected = null; assertThat(actual, is(equalTo(expected))); }
@Test public void trimAll_A$String_StringIsEmpty() throws Exception { TrimQuotationFilter target = new TrimQuotationFilter(); String src = ""; String actual = target.trimAll(src); String expected = ""; assertThat(actual, is(equalTo(expected))); }