コード例 #1
0
        @Override
        protected void before() throws Throwable {
          SetupRpcConnection setupRpcConnection =
              description.getAnnotation(SetupRpcConnection.class);

          if (setupRpcConnection == null || setupRpcConnection.setupRpcServer()) {
            setUpRpcServer();
          }

          if (setupRpcConnection == null || setupRpcConnection.setupRpcClient()) {
            setUpRpcClient();
          }
        }
コード例 #2
0
        @Override
        protected void after() {
          SetupRpcConnection setupRpcConnection =
              description.getAnnotation(SetupRpcConnection.class);

          if (setupRpcConnection == null || setupRpcConnection.setupRpcClient()) {
            try {
              tearDownRpcClient();
            } catch (Exception e) {
              fail(e.getMessage());
            }
          }

          if (setupRpcConnection == null || setupRpcConnection.setupRpcServer()) {
            try {
              tearDownRpcServer();
            } catch (Exception e) {
              fail(e.getMessage());
            }
          }
        }