@Test public void testAreConstraintsSatisfied_unmeteredNetworkRequired_unsatisfied_networkMetered() { JobInvocation job = jobBuilder.setConstraints(Constraint.uncompact(Constraint.ON_UNMETERED_NETWORK)).build(); shadowNetworkInfo.setConnectionStatus( true); setNetworkMetered(true); assertThat(constraintChecker.areConstraintsSatisfied(job)).isFalse(); }
public boolean areConstraintsSatisfied(JobInvocation job) { int jobConstraints = Constraint.compact(job.getConstraints()); return areNetworkConstraintsSatisfied(jobConstraints); }
ConstraintChecker { public boolean areConstraintsSatisfied(JobInvocation job) { int jobConstraints = Constraint.compact(job.getConstraints()); return areNetworkConstraintsSatisfied(jobConstraints); } }
ConstraintChecker { public boolean areConstraintsSatisfied(JobInvocation job) { int jobConstraints = Constraint.compact(job.getConstraints()); return areNetworkConstraintsSatisfied(jobConstraints); } ConstraintChecker(Context context); }
ConstraintChecker { public boolean areConstraintsSatisfied(JobInvocation job) { int jobConstraints = Constraint.compact(job.getConstraints()); return areNetworkConstraintsSatisfied(jobConstraints); } ConstraintChecker(Context context); boolean areConstraintsSatisfied(JobInvocation job); }
ConstraintChecker { public boolean areConstraintsSatisfied(JobInvocation job) { int jobConstraints = Constraint.compact(job.getConstraints()); return areNetworkConstraintsSatisfied(jobConstraints); } ConstraintChecker(Context context); boolean areConstraintsSatisfied(JobInvocation job);  }