14 lines
946 B
Java
14 lines
946 B
Java
import com.widgetworkbench.cheerpj.WorkplaceCredentialBridge;
|
|
/** Mimics verified public method signatures, not proprietary MES behavior. */
|
|
public final class WorkplaceCredentialBridgeSmoke {
|
|
public static void main(String[] args) throws Exception {
|
|
final String secret="secret123";
|
|
if(WorkplaceCredentialBridge.offer("tester",secret,"any")!=1)throw new AssertionError("first offer rejected");
|
|
if(WorkplaceCredentialBridge.offer("tester",secret,"any")!=0)throw new AssertionError("duplicate offer accepted");
|
|
long deadline=System.currentTimeMillis()+6000;
|
|
while(WorkplaceCredentialBridge.getResultCode()==0 && System.currentTimeMillis()<deadline)Thread.sleep(50);
|
|
if(WorkplaceCredentialBridge.getResultCode()!=1)throw new AssertionError("MES handoff failed: "+WorkplaceCredentialBridge.getResultCode());
|
|
System.out.println("PASS Java11 independent PersonService reflection and one-shot credential delivery");
|
|
}
|
|
}
|