fixes + @NotNull -> @Nonnull
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
package org.solovyev.android;
|
||||
|
||||
import junit.framework.Assert;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.junit.Test;
|
||||
import org.solovyev.android.calculator.units.CalculatorNumeralBase;
|
||||
import org.solovyev.common.units.Unit;
|
||||
import org.solovyev.common.units.UnitConverter;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Date;
|
||||
import java.util.Random;
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.Random;
|
||||
*/
|
||||
public class AndroidNumeralBaseTest {
|
||||
|
||||
@NotNull
|
||||
@Nonnull
|
||||
private final UnitConverter c = CalculatorNumeralBase.getConverter();
|
||||
|
||||
@Test
|
||||
@@ -59,8 +59,8 @@ public class AndroidNumeralBaseTest {
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private String convertChain(@NotNull String value, @NotNull CalculatorNumeralBase baseAndroid, @NotNull CalculatorNumeralBase... typeAndroids) {
|
||||
@Nonnull
|
||||
private String convertChain(@Nonnull String value, @Nonnull CalculatorNumeralBase baseAndroid, @Nonnull CalculatorNumeralBase... typeAndroids) {
|
||||
Unit<String> unit = baseAndroid.createUnit(value);
|
||||
|
||||
for (CalculatorNumeralBase typeAndroid : typeAndroids) {
|
||||
|
@@ -2,13 +2,14 @@ package org.solovyev.android.calculator;
|
||||
|
||||
import android.content.Context;
|
||||
import jscl.JsclMathEngine;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.mockito.Mockito;
|
||||
import org.solovyev.android.calculator.external.CalculatorExternalListenersContainer;
|
||||
import org.solovyev.android.calculator.history.CalculatorHistory;
|
||||
import org.solovyev.android.calculator.plot.CalculatorPlotter;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* User: serso
|
||||
* Date: 10/7/12
|
||||
@@ -25,7 +26,7 @@ public class CalculatorTestUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static void initViews(@NotNull Context context) {
|
||||
public static void initViews(@Nonnull Context context) {
|
||||
final AndroidCalculatorEditorView editor = new AndroidCalculatorEditorView(context);
|
||||
editor.init(context);
|
||||
Locator.getInstance().getEditor().setView(editor);
|
||||
@@ -40,7 +41,7 @@ public class CalculatorTestUtils {
|
||||
}
|
||||
|
||||
|
||||
@NotNull
|
||||
@Nonnull
|
||||
static CalculatorEngineImpl newCalculatorEngine() {
|
||||
final MathEntityDao mathEntityDao = Mockito.mock(MathEntityDao.class);
|
||||
|
||||
|
@@ -1,9 +1,10 @@
|
||||
package org.solovyev.android.calculator;
|
||||
|
||||
import com.xtremelabs.robolectric.RobolectricConfig;
|
||||
import com.xtremelabs.robolectric.RobolectricTestRunner;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.junit.runners.model.InitializationError;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
@@ -13,7 +14,17 @@ import java.io.File;
|
||||
*/
|
||||
public class CalculatorppTestRunner extends RobolectricTestRunner {
|
||||
|
||||
public CalculatorppTestRunner(@NotNull Class<?> testClass) throws InitializationError {
|
||||
public CalculatorppTestRunner(@Nonnull Class<?> testClass) throws InitializationError {
|
||||
super(testClass, new File("."));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupApplicationState(RobolectricConfig robolectricConfig) {
|
||||
try {
|
||||
CalculatorTestUtils.staticSetUp();
|
||||
} catch (Exception e) {
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
super.setupApplicationState(robolectricConfig);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user