File tree Expand file tree Collapse file tree
binder/src/androidTest/java/io/grpc/binder Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5858import java .io .IOException ;
5959import java .io .InputStream ;
6060import java .util .ArrayList ;
61+ import java .util .concurrent .ExecutionException ;
6162import java .util .concurrent .Executors ;
6263import java .util .concurrent .atomic .AtomicReference ;
6364import org .junit .After ;
@@ -158,6 +159,21 @@ public void setUp() throws Exception {
158159 .build ();
159160 }
160161
162+ @ Test
163+ public void testConnectViaIntentTargetUri () throws Exception {
164+ // TODO(jdcormie): Make this test good.
165+ channel = BinderChannelBuilder .forTarget ("intent://foo/bar" , appContext ).build ();
166+ // channel = BinderChannelBuilder.forTarget("android-app://com.foo.bar/authoritaaay",
167+ // appContext).build();
168+ ListenableFuture <String > resultFuture = doCall ("Hello" );
169+ try {
170+ resultFuture .get ();
171+ } catch (ExecutionException ee ) {
172+ StatusRuntimeException sre = (StatusRuntimeException ) ee .getCause ();
173+ assertThat (sre .getStatus ().getCode ()).isEqualTo (Code .UNIMPLEMENTED );
174+ }
175+ }
176+
161177 @ After
162178 public void tearDown () throws Exception {
163179 channel .shutdownNow ();
You can’t perform that action at this time.
0 commit comments