
org.robolectric.shadows.ShadowDateUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shadows-framework Show documentation
Show all versions of shadows-framework Show documentation
An alternative Android testing framework.
The newest version!
package org.robolectric.shadows;
import static org.robolectric.util.reflector.Reflector.reflector;
import android.text.format.DateUtils;
import org.robolectric.annotation.Implements;
import org.robolectric.util.reflector.Accessor;
import org.robolectric.util.reflector.ForType;
import org.robolectric.util.reflector.Static;
/** Shadow for {@link DateUtils}. */
@Implements(value = DateUtils.class, isInAndroidSdk = false)
public class ShadowDateUtils {
/**
* internal only
*
* Does not need to be a resetter method because Configuration at test startup.
*/
public static void resetLastConfig() {
reflector(DateUtilsReflector.class).setLastConfig(null);
}
@ForType(DateUtils.class)
interface DateUtilsReflector {
@Static
@Accessor("sLastConfig")
void setLastConfig(String lastConfig);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy