DATACMNS-973 - Migrate ticket references in test code to Spring Framework style.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2014 the original author or authors.
|
||||
* Copyright 2011-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,10 +33,7 @@ public class BoxUnitTests {
|
||||
Box second = new Box(new Point(1d, 1d), new Point(2d, 2d));
|
||||
Box third = new Box(new Point(3d, 3d), new Point(1d, 1d));
|
||||
|
||||
/**
|
||||
* @see DATACMNS-437
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-437
|
||||
public void equalsWorksCorrectly() {
|
||||
|
||||
assertThat(first.equals(second), is(true));
|
||||
@@ -44,29 +41,20 @@ public class BoxUnitTests {
|
||||
assertThat(first.equals(third), is(false));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-437
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-437
|
||||
public void hashCodeWorksCorrectly() {
|
||||
|
||||
assertThat(first.hashCode(), is(second.hashCode()));
|
||||
assertThat(first.hashCode(), is(not(third.hashCode())));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-437
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-437
|
||||
public void testToString() {
|
||||
|
||||
assertThat(first.toString(), is("Box [Point [x=1.000000, y=1.000000], Point [x=2.000000, y=2.000000]]"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-482
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-482
|
||||
public void testSerialization() {
|
||||
|
||||
Box serialized = (Box) SerializationUtils.deserialize(SerializationUtils.serialize(first));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2014 the original author or authors.
|
||||
* Copyright 2011-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,26 +29,17 @@ import org.springframework.util.SerializationUtils;
|
||||
*/
|
||||
public class CircleUnitTests {
|
||||
|
||||
/**
|
||||
* @see DATACMNS-437
|
||||
*/
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class) // DATACMNS-437
|
||||
public void rejectsNullOrigin() {
|
||||
new Circle(null, new Distance(0));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-437
|
||||
*/
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class) // DATACMNS-437
|
||||
public void rejectsNegativeRadius() {
|
||||
new Circle(1, 1, -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-437
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-437
|
||||
public void considersTwoCirclesEqualCorrectly() {
|
||||
|
||||
Circle left = new Circle(1, 1, 1);
|
||||
@@ -63,19 +54,13 @@ public class CircleUnitTests {
|
||||
assertThat(right, is(left));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-437
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-437
|
||||
public void testToString() {
|
||||
|
||||
assertThat(new Circle(1, 1, 1).toString(), is("Circle: [center=Point [x=1.000000, y=1.000000], radius=1.0]"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-482
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-482
|
||||
public void testSerialization() {
|
||||
|
||||
Circle circle = new Circle(1, 1, 1);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2015 the original author or authors.
|
||||
* Copyright 2011-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -35,20 +35,14 @@ public class DistanceUnitTests {
|
||||
private static final double TEN_MILES_NORMALIZED = 0.002523219294755161;
|
||||
private static final double TEN_KM_NORMALIZED = 0.001567855942887398;
|
||||
|
||||
/**
|
||||
* @see DATACMNS-437
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-437
|
||||
public void defaultsMetricToNeutralOne() {
|
||||
|
||||
assertThat(new Distance(2.5).getMetric(), is((Metric) Metrics.NEUTRAL));
|
||||
assertThat(new Distance(2.5, null).getMetric(), is((Metric) Metrics.NEUTRAL));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-437
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-437
|
||||
public void addsDistancesWithoutExplicitMetric() {
|
||||
|
||||
Distance left = new Distance(2.5, KILOMETERS);
|
||||
@@ -57,10 +51,7 @@ public class DistanceUnitTests {
|
||||
assertThat(left.add(right), is(new Distance(5.0, KILOMETERS)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-437
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-437
|
||||
public void addsDistancesWithExplicitMetric() {
|
||||
|
||||
Distance left = new Distance(2.5, KILOMETERS);
|
||||
@@ -69,10 +60,7 @@ public class DistanceUnitTests {
|
||||
assertThat(left.add(right, MILES), is(new Distance(3.106856281073925, MILES)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-474
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-474
|
||||
public void distanceWithSameMetricShoudEqualAfterConversion() {
|
||||
|
||||
assertThat(new Distance(1).in(NEUTRAL), is(new Distance(1)));
|
||||
@@ -80,20 +68,14 @@ public class DistanceUnitTests {
|
||||
assertThat(new Distance(TEN_MILES_NORMALIZED).in(MILES), is(new Distance(10, MILES)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-474
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-474
|
||||
public void distanceWithDifferentMetricShoudEqualAfterConversion() {
|
||||
|
||||
assertThat(new Distance(10, MILES), is(new Distance(TEN_MILES_NORMALIZED).in(MILES)));
|
||||
assertThat(new Distance(10, KILOMETERS), is(new Distance(TEN_KM_NORMALIZED).in(KILOMETERS)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-474
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-474
|
||||
public void conversionShouldProduceCorrectNormalizedValue() {
|
||||
|
||||
assertThat(new Distance(TEN_KM_NORMALIZED, NEUTRAL).in(KILOMETERS).getNormalizedValue(),
|
||||
@@ -115,10 +97,7 @@ public class DistanceUnitTests {
|
||||
closeTo(new Distance(6.21371192, MILES).getNormalizedValue(), EPS));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-474
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-474
|
||||
public void toStringAfterConversion() {
|
||||
|
||||
assertThat(new Distance(10, KILOMETERS).in(MILES).toString(), is(new Distance(6.21371256214785, MILES).toString()));
|
||||
@@ -126,10 +105,7 @@ public class DistanceUnitTests {
|
||||
is(new Distance(10, KILOMETERS).toString()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-482
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-482
|
||||
public void testSerialization() {
|
||||
|
||||
Distance dist = new Distance(10, KILOMETERS);
|
||||
@@ -138,18 +114,12 @@ public class DistanceUnitTests {
|
||||
assertThat(serialized, is(dist));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-626
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-626
|
||||
public void returnsMetricsAbbreviationAsUnit() {
|
||||
assertThat(new Distance(10, KILOMETERS).getUnit(), is("km"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-651
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-651
|
||||
public void createsARangeCorrectly() {
|
||||
|
||||
Distance twoKilometers = new Distance(2, KILOMETERS);
|
||||
@@ -162,10 +132,7 @@ public class DistanceUnitTests {
|
||||
assertThat(range.getUpperBound(), is(tenKilometers));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-651
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-651
|
||||
public void createsARangeFromPiecesCorrectly() {
|
||||
|
||||
Distance twoKilometers = new Distance(2, KILOMETERS);
|
||||
@@ -178,10 +145,7 @@ public class DistanceUnitTests {
|
||||
assertThat(range.getUpperBound(), is(tenKilometers));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-651
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-651
|
||||
public void implementsComparableCorrectly() {
|
||||
|
||||
Distance twoKilometers = new Distance(2, KILOMETERS);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
* Copyright 2014-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -39,10 +39,7 @@ public class GeoModuleIntegrationTests {
|
||||
this.mapper.registerModule(new GeoModule());
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-475
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-475
|
||||
public void deserializesDistance() throws Exception {
|
||||
|
||||
String json = "{\"value\":10.0,\"metric\":\"KILOMETERS\"}";
|
||||
@@ -52,10 +49,7 @@ public class GeoModuleIntegrationTests {
|
||||
assertThat(mapper.writeValueAsString(reference), is(json));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-475
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-475
|
||||
public void deserializesPoint() throws Exception {
|
||||
|
||||
String json = "{\"x\":10.0,\"y\":20.0}";
|
||||
@@ -65,10 +59,7 @@ public class GeoModuleIntegrationTests {
|
||||
assertThat(mapper.writeValueAsString(reference), is(json));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-475
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-475
|
||||
public void deserializesCircle() throws Exception {
|
||||
|
||||
String json = "{\"center\":{\"x\":10.0,\"y\":20.0},\"radius\":{\"value\":10.0,\"metric\":\"KILOMETERS\"}}";
|
||||
@@ -78,10 +69,7 @@ public class GeoModuleIntegrationTests {
|
||||
assertThat(mapper.writeValueAsString(reference), is(json));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-475
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-475
|
||||
public void deserializesBox() throws Exception {
|
||||
|
||||
String json = "{\"first\":{\"x\":1.0,\"y\":2.0},\"second\":{\"x\":2.0,\"y\":3.0}}";
|
||||
@@ -91,10 +79,7 @@ public class GeoModuleIntegrationTests {
|
||||
assertThat(mapper.writeValueAsString(reference), is(json));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-475
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-475
|
||||
public void deserializesPolygon() throws Exception {
|
||||
|
||||
String json = "{\"points\":[{\"x\":1.0,\"y\":2.0},{\"x\":2.0,\"y\":3.0},{\"x\":3.0,\"y\":4.0}]}";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2014 the original author or authors.
|
||||
* Copyright 2011-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -34,19 +34,13 @@ public class GeoResultUnitTests {
|
||||
GeoResult<String> third = new GeoResult<String>("Bar", new Distance(2.5));
|
||||
GeoResult<String> fourth = new GeoResult<String>("Foo", new Distance(5.2));
|
||||
|
||||
/**
|
||||
* @see DATACMNS-437
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-437
|
||||
public void considersSameInstanceEqual() {
|
||||
|
||||
assertThat(first.equals(first), is(true));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-437
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-437
|
||||
public void considersSameValuesAsEqual() {
|
||||
|
||||
assertThat(first.equals(second), is(true));
|
||||
@@ -57,19 +51,13 @@ public class GeoResultUnitTests {
|
||||
assertThat(fourth.equals(first), is(false));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-437
|
||||
*/
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class) // DATACMNS-437
|
||||
public void rejectsNullContent() {
|
||||
new GeoResult(null, new Distance(2.5));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-482
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-482
|
||||
public void testSerialization() {
|
||||
|
||||
GeoResult<String> result = new GeoResult<String>("test", new Distance(2));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2014 the original author or authors.
|
||||
* Copyright 2011-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -31,10 +31,7 @@ import org.springframework.util.SerializationUtils;
|
||||
*/
|
||||
public class GeoResultsUnitTests {
|
||||
|
||||
/**
|
||||
* @see DATACMNS-437
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-437
|
||||
@SuppressWarnings("unchecked")
|
||||
public void calculatesAverageForGivenGeoResults() {
|
||||
|
||||
@@ -45,10 +42,7 @@ public class GeoResultsUnitTests {
|
||||
assertThat(geoResults.getAverageDistance(), is(new Distance(3.5)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-482
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-482
|
||||
public void testSerialization() {
|
||||
|
||||
GeoResult<String> result = new GeoResult<String>("test", new Distance(2));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2014 the original author or authors.
|
||||
* Copyright 2011-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,18 +29,12 @@ import org.springframework.util.SerializationUtils;
|
||||
*/
|
||||
public class PointUnitTests {
|
||||
|
||||
/**
|
||||
* @see DATACMNS-437
|
||||
*/
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class) // DATACMNS-437
|
||||
public void rejectsNullforCopyConstructor() {
|
||||
new Point(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-437
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-437
|
||||
public void equalsIsImplementedCorrectly() {
|
||||
|
||||
assertThat(new Point(1.5, 1.5), is(equalTo(new Point(1.5, 1.5))));
|
||||
@@ -48,18 +42,12 @@ public class PointUnitTests {
|
||||
assertThat(new Point(2.0, 2.0), is(not(equalTo(new Point(1.5, 1.5)))));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-437
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-437
|
||||
public void invokingToStringWorksCorrectly() {
|
||||
assertThat(new Point(1.5, 1.5).toString(), is("Point [x=1.500000, y=1.500000]"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-482
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-482
|
||||
public void testSerialization() {
|
||||
|
||||
Point point = new Point(1.5, 1.5);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2014 the original author or authors.
|
||||
* Copyright 2011-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,18 +33,12 @@ public class PolygonUnitTests {
|
||||
Point second = new Point(2, 2);
|
||||
Point third = new Point(3, 3);
|
||||
|
||||
/**
|
||||
* @see DATACMNS-437
|
||||
*/
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class) // DATACMNS-437
|
||||
public void rejectsNullPoints() {
|
||||
new Polygon(null, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-437
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-437
|
||||
public void createsSimplePolygon() {
|
||||
|
||||
Polygon polygon = new Polygon(third, second, first);
|
||||
@@ -52,10 +46,7 @@ public class PolygonUnitTests {
|
||||
assertThat(polygon, is(notNullValue()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-437
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-437
|
||||
public void isEqualForSamePoints() {
|
||||
|
||||
Polygon left = new Polygon(third, second, first);
|
||||
@@ -65,20 +56,14 @@ public class PolygonUnitTests {
|
||||
assertThat(right, is(left));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-437
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-437
|
||||
public void testToString() {
|
||||
|
||||
assertThat(new Polygon(third, second, first).toString(),
|
||||
is("Polygon: [Point [x=3.000000, y=3.000000],Point [x=2.000000, y=2.000000],Point [x=1.000000, y=1.000000]]"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATACMNS-482
|
||||
*/
|
||||
@Test
|
||||
@Test // DATACMNS-482
|
||||
public void testSerialization() {
|
||||
|
||||
Polygon polygon = new Polygon(third, second, first);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2015 the original author or authors.
|
||||
* Copyright 2014-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -50,26 +50,17 @@ public class DistanceFormatterUnitTests {
|
||||
|
||||
public static class UnparameterizedTests {
|
||||
|
||||
/**
|
||||
* @see DATAREST-279, DATACMNS-626
|
||||
*/
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class) // DATAREST-279, DATACMNS-626
|
||||
public void rejectsArbitraryNonsense() {
|
||||
INSTANCE.convert("foo");
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATAREST-279, DATACMNS-626
|
||||
*/
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class) // DATAREST-279, DATACMNS-626
|
||||
public void rejectsUnsupportedMetric() {
|
||||
INSTANCE.convert("10.8cm");
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATAREST-279, DATACMNS-626
|
||||
*/
|
||||
@Test
|
||||
@Test // DATAREST-279, DATACMNS-626
|
||||
public void printsDistance() {
|
||||
assertThat(INSTANCE.print(REFERENCE, Locale.US), is("10.8km"));
|
||||
}
|
||||
@@ -87,10 +78,7 @@ public class DistanceFormatterUnitTests {
|
||||
|
||||
public @Parameter String source;
|
||||
|
||||
/**
|
||||
* @see DATAREST-279, DATACMNS-626
|
||||
*/
|
||||
@Test
|
||||
@Test // DATAREST-279, DATACMNS-626
|
||||
public void parsesDistanceFromString() {
|
||||
assertThat(INSTANCE.convert(source), is(REFERENCE));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2015 the original author or authors.
|
||||
* Copyright 2014-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -53,10 +53,7 @@ public class PointFormatterUnitTests {
|
||||
|
||||
public @Rule ExpectedException exception = ExpectedException.none();
|
||||
|
||||
/**
|
||||
* @see DATAREST-279, DATACMNS-626
|
||||
*/
|
||||
@Test
|
||||
@Test // DATAREST-279, DATACMNS-626
|
||||
public void rejectsArbitraryNonsense() {
|
||||
|
||||
exception.expect(IllegalArgumentException.class);
|
||||
@@ -65,18 +62,12 @@ public class PointFormatterUnitTests {
|
||||
INSTANCE.convert("foo");
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATAREST-279, DATACMNS-626
|
||||
*/
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class) // DATAREST-279, DATACMNS-626
|
||||
public void rejectsMoreThanTwoCoordinates() {
|
||||
INSTANCE.convert("10.8,20.9,30.10");
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATAREST-279, DATACMNS-626
|
||||
*/
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class) // DATAREST-279, DATACMNS-626
|
||||
public void rejectsInvalidCoordinate() {
|
||||
INSTANCE.convert("10.8,foo");
|
||||
}
|
||||
@@ -93,18 +84,12 @@ public class PointFormatterUnitTests {
|
||||
|
||||
public @Parameter String source;
|
||||
|
||||
/**
|
||||
* @see DATAREST-279, DATACMNS-626
|
||||
*/
|
||||
@Test
|
||||
@Test // DATAREST-279, DATACMNS-626
|
||||
public void convertsPointFromString() {
|
||||
assertThat(INSTANCE.convert(source), is(REFERENCE));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DATAREST-279, DATACMNS-626
|
||||
*/
|
||||
@Test
|
||||
@Test // DATAREST-279, DATACMNS-626
|
||||
public void parsesPoint() throws ParseException {
|
||||
assertThat(INSTANCE.parse(source, Locale.US), is(REFERENCE));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user