Skip to content
Snippets Groups Projects
Commit e013b049 authored by Hallvard Trætteberg's avatar Hallvard Trætteberg
Browse files

Fixed some formatting, and a bug introduced when renaming a method

referenced in fxml
parent 912e1bd0
No related branches found
No related tags found
No related merge requests found
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<SeparatorMenuItem/> <SeparatorMenuItem/>
<Menu fx:id="importMenu" text="Import"> <Menu fx:id="importMenu" text="Import">
<MenuItem text="File..." onAction="#handleFileImportAction"/> <MenuItem text="File..." onAction="#handleFileImportAction"/>
<MenuItem text="URL..." onAction="#handleURLImportAction"/> <MenuItem text="URL..." onAction="#handleUrlImportAction"/>
</Menu> </Menu>
</items> </items>
</Menu> </Menu>
...@@ -22,6 +22,7 @@ public class LatLongTest { ...@@ -22,6 +22,7 @@ public class LatLongTest {
testLatLong(LatLong.valueOf("63.0; 10.0", ","), 63.0, 10.0); testLatLong(LatLong.valueOf("63.0; 10.0", ","), 63.0, 10.0);
Assert.fail("Should throw IllegalArgumentException"); Assert.fail("Should throw IllegalArgumentException");
} catch (final IllegalArgumentException e) { } catch (final IllegalArgumentException e) {
// ok
} catch (final Exception e) { } catch (final Exception e) {
Assert.fail("Should throw IllegalArgumentException"); Assert.fail("Should throw IllegalArgumentException");
} }
......
...@@ -23,14 +23,14 @@ public abstract class AbstractJsonTest { ...@@ -23,14 +23,14 @@ public abstract class AbstractJsonTest {
protected abstract ObjectMapper createObjectMapper(); protected abstract ObjectMapper createObjectMapper();
protected <T> SimpleModule createSimpleModule(final Class<T> clazz, protected <T> ObjectMapper createObjectMapper(final Class<T> clazz,
final JsonSerializer<T> serializer, final JsonDeserializer<T> deserializer) { final JsonSerializer<T> serializer, final JsonDeserializer<T> deserializer) {
return new SimpleModule().addSerializer(clazz, serializer).addDeserializer(clazz, deserializer); return new ObjectMapper().registerModule(createSimpleModule(clazz, serializer, deserializer));
} }
protected <T> ObjectMapper createObjectMapper(final Class<T> clazz, protected <T> SimpleModule createSimpleModule(final Class<T> clazz,
final JsonSerializer<T> serializer, final JsonDeserializer<T> deserializer) { final JsonSerializer<T> serializer, final JsonDeserializer<T> deserializer) {
return new ObjectMapper().registerModule(createSimpleModule(clazz, serializer, deserializer)); return new SimpleModule().addSerializer(clazz, serializer).addDeserializer(clazz, deserializer);
} }
protected void assertEqualsIgnoreWhitespace(final String expected, final String actual) protected void assertEqualsIgnoreWhitespace(final String expected, final String actual)
......
...@@ -60,7 +60,7 @@ public class FxAppTest extends ApplicationTest { ...@@ -60,7 +60,7 @@ public class FxAppTest extends ApplicationTest {
latLongs = mock(LatLongs.class); latLongs = mock(LatLongs.class);
// get nth LatLong object // get nth LatLong object
when(latLongs.getLatLong(anyInt())) when(latLongs.getLatLong(anyInt()))
.then(invocation -> latLongList.get(invocation.getArgument(0))); .then(invocation -> latLongList.get(invocation.getArgument(0)));
// get the number of LatLong objects // get the number of LatLong objects
when(latLongs.getLatLongCount()).then(invocation -> latLongList.size()); when(latLongs.getLatLongCount()).then(invocation -> latLongList.size());
// iterator for LatLong objects // iterator for LatLong objects
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<SeparatorMenuItem/> <SeparatorMenuItem/>
<Menu fx:id="importMenu" text="Import"> <Menu fx:id="importMenu" text="Import">
<MenuItem text="File..." onAction="#handleFileImportAction"/> <MenuItem text="File..." onAction="#handleFileImportAction"/>
<MenuItem text="URL..." onAction="#handleURLImportAction"/> <MenuItem text="URL..." onAction="#handleUrlImportAction"/>
</Menu> </Menu>
</items> </items>
</Menu> </Menu>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment