Skip to content

Commit

Permalink
Merge c2d9fbf into c8fb9e3
Browse files Browse the repository at this point in the history
  • Loading branch information
camauser committed Aug 12, 2020
2 parents c8fb9e3 + c2d9fbf commit 0716544
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ public String convert(Object val) throws ConverterException {
}
}

return val.toString().trim();
return val.toString();
}
}
28 changes: 28 additions & 0 deletions core/src/test/java/org/sql2o/converters/StringConverterTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package org.sql2o.converters;

import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.*;

public class StringConverterTest {

private StringConverter converter;

@Before
public void setup() {
converter = new StringConverter();
}

@Test
public void convert_shouldNotTrimWhitespace_whenGivenString() throws ConverterException {
// Arrange
String expected = " Hello world! ";

// Act
String actual = converter.convert(expected);

// Assert
assertEquals(expected, actual);
}
}

0 comments on commit 0716544

Please sign in to comment.