mirror of https://github.com/tasks/tasks
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
659 B
Java
22 lines
659 B
Java
package org.tasks;
|
|
|
|
import android.content.Context;
|
|
|
|
import java.util.Date;
|
|
|
|
public class TestUtilities {
|
|
private static boolean mockitoInitialized;
|
|
|
|
public static void initializeMockito(Context context) {
|
|
if (!mockitoInitialized) {
|
|
// for mockito: https://code.google.com/p/dexmaker/issues/detail?id=2
|
|
System.setProperty("dexmaker.dexcache", context.getCacheDir().toString());
|
|
mockitoInitialized = true;
|
|
}
|
|
}
|
|
|
|
public static Date newDateTime(int year, int month, int day, int hour, int minute, int second) {
|
|
return new Date(year - 1900, month - 1, day, hour, minute, second);
|
|
}
|
|
}
|