Commit 5ea07167 authored by mey's avatar mey
Browse files

renamed AmountIsCloseTo to AmountCloseTo

parent ec624928
package de.zmt.storage; package de.zmt.storage;
import static de.zmt.storage.LimitedTestStorage.*; import static de.zmt.storage.LimitedTestStorage.*;
import static org.hamcrest.AmountIsCloseTo.amountCloseTo; import static org.hamcrest.AmountCloseTo.amountCloseTo;
import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.*; import static org.junit.Assert.*;
......
package de.zmt.storage; package de.zmt.storage;
import static de.zmt.storage.LimitedTestStorage.*; import static de.zmt.storage.LimitedTestStorage.*;
import static org.hamcrest.AmountIsCloseTo.amountCloseTo; import static org.hamcrest.AmountCloseTo.amountCloseTo;
import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.*; import static org.junit.Assert.*;
......
...@@ -8,11 +8,11 @@ import org.hamcrest.Matchers; ...@@ -8,11 +8,11 @@ import org.hamcrest.Matchers;
import org.hamcrest.TypeSafeMatcher; import org.hamcrest.TypeSafeMatcher;
import org.jscience.physics.amount.Amount; import org.jscience.physics.amount.Amount;
public class AmountIsCloseTo extends TypeSafeMatcher<Amount<?>> { public class AmountCloseTo extends TypeSafeMatcher<Amount<?>> {
private final Amount<?> amount; private final Amount<?> amount;
private static final double MAX_ERROR = 1E-14d; private static final double MAX_ERROR = 1E-14d;
AmountIsCloseTo(Class<?> expectedType, Amount<?> amount) { AmountCloseTo(Class<?> expectedType, Amount<?> amount) {
super(expectedType); super(expectedType);
this.amount = amount; this.amount = amount;
} }
...@@ -30,6 +30,6 @@ public class AmountIsCloseTo extends TypeSafeMatcher<Amount<?>> { ...@@ -30,6 +30,6 @@ public class AmountIsCloseTo extends TypeSafeMatcher<Amount<?>> {
@Factory @Factory
public static org.hamcrest.Matcher<Amount<?>> amountCloseTo(final Amount<?> amount) { public static org.hamcrest.Matcher<Amount<?>> amountCloseTo(final Amount<?> amount) {
return new AmountIsCloseTo(Amount.class, amount); return new AmountCloseTo(Amount.class, amount);
} }
} }
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment