org.fest.assertions.api.android.os.VibratorAssert Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fest-android Show documentation
Show all versions of fest-android Show documentation
A set of FEST assertion helpers geared toward testing Android.
// Copyright 2013 Square, Inc.
package org.fest.assertions.api.android.os;
import android.os.Vibrator;
import org.fest.assertions.api.Assertions;
import org.fest.assertions.api.AbstractAssert;
/** Assertions for {@link Vibrator} instances. Buzz buzz. */
public class VibratorAssert extends AbstractAssert {
public VibratorAssert(Vibrator actual) {
super(actual, VibratorAssert.class);
}
public VibratorAssert hasVibrator() {
isNotNull();
Assertions.assertThat(actual.hasVibrator()) //
.overridingErrorMessage("Expected to have vibrator but did not.") //
.isTrue();
return this;
}
public VibratorAssert hasNoVibrator() {
isNotNull();
Assertions.assertThat(actual.hasVibrator()) //
.overridingErrorMessage("Expected to not have vibrator but did.") //
.isFalse();
return this;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy