src/base/fuchsia/scoped_service_binding_unittest.cc
TEST_F(ScopedServiceBindingTest, ConnectTwiceNewName) {
  const char kInterfaceName[] = "fuchsia.TestInterface2";

  ScopedServiceBinding<testfidl::TestInterface> new_service_binding(
      outgoing_directory_.get(), &test_service_, kInterfaceName);

  testfidl::TestInterfacePtr stub, stub2;
  public_service_directory_->Connect(
       kInterfaceName, stub.NewRequest().TakeChannel());
  public_service_directory_->Connect(
       kInterfaceName, stub2.NewRequest().TakeChannel());
  VerifyTestInterface(&stub, ZX_OK);
  VerifyTestInterface(&stub2, ZX_OK);
}
// Verifies that ScopedServiceBinding allows connection more than once.
Verifies that ScopedServiceBinding allows connection more than once.
Verifies that ScopedServiceBinding allows connection more than once .
TEST_F(ScopedServiceBindingTest, ConnectTwiceNewName) {
  const char kInterfaceName[] = "fuchsia.TestInterface2";
  ScopedServiceBinding<testfidl::TestInterface> new_service_binding(
      outgoing_directory_.get(), &test_service_, kInterfaceName);
  testfidl::TestInterfacePtr stub, stub2;
  public_service_directory_->Connect(
       kInterfaceName, stub.NewRequest().TakeChannel());
  public_service_directory_->Connect(
       kInterfaceName, stub2.NewRequest().TakeChannel());
  VerifyTestInterface(&stub, ZX_OK);
  VerifyTestInterface(&stub2, ZX_OK);
}
TEST_F ( ScopedServiceBindingTest , ConnectTwiceNewName ) { const char kInterfaceName [ ] = " " ; ScopedServiceBinding < testfidl :: TestInterface > new_service_binding ( outgoing_directory_ . get ( ) , & test_service_ , kInterfaceName ) ; testfidl :: TestInterfacePtr stub , stub2 ; public_service_directory_ -> Connect ( kInterfaceName , stub . NewRequest ( ) . TakeChannel ( ) ) ; public_service_directory_ -> Connect ( kInterfaceName , stub2 . NewRequest ( ) . TakeChannel ( ) ) ; VerifyTestInterface ( & stub , ZX_OK ) ; VerifyTestInterface ( & stub2 , ZX_OK ) ; }
Verifies that ScopedServiceBinding allows connection more than once.
Verifies that ScopedServiceBinding allows connection more than once .