Sha256: d75883e9c8d4990b28d21182993ce1765bf2836189f5690b9d1933f926898ec7
Contents?: true
Size: 875 Bytes
Versions: 120
Compression:
Stored size: 875 Bytes
Contents
package sh.calaba.instrumentationbackend.actions.view; import sh.calaba.instrumentationbackend.Result; import sh.calaba.instrumentationbackend.TestHelpers; import sh.calaba.instrumentationbackend.actions.Action; import android.view.View; public class IsEnabled implements Action { @Override public Result execute(String... args) { final String firstArgument = args[0]; final View foundView = TestHelpers.getViewById(firstArgument); if( null == foundView ) { return notFoundResult(firstArgument); } return new Result(foundView.isEnabled()); } @Override public String key() { return "is_enabled"; } private Result notFoundResult(final String firstArgument) { return Result.failedResult(String.format("View with id %s was not found", firstArgument)); } }
Version data entries
120 entries across 120 versions & 2 rubygems