コード例 #1
0
 @Test
 public void accessAndUpdateRemoteDbWithSlashInName() throws Exception {
   // do a little set up for this specific test
   CouchConfig config = super.getCouchConfig("myslash%2Fencoded_db");
   remoteDb =
       new CouchClientWrapper(
           config.getRootUri(), config.getRequestInterceptors(), config.getResponseInterceptors());
   CouchClientWrapperDbUtils.deleteDbQuietly(remoteDb);
   remoteDb.createDatabase();
   Bar bar1 = new Bar();
   Response res1 = remoteDb.create(bar1);
   Assert.assertNotNull(res1);
   Assert.assertTrue(res1.getOk());
 }
コード例 #2
0
  @Before
  public void setup() throws IOException {
    CouchConfig config = super.getCouchConfig(CLOUDANT_TEST_DB_NAME + System.currentTimeMillis());
    remoteDb =
        new CouchClientWrapper(
            config.getRootUri(), config.getRequestInterceptors(), config.getResponseInterceptors());
    bodyOne =
        DocumentBodyFactory.create(
            FileUtils.readFileToByteArray(TestUtils.loadFixture(documentOneFile)));
    bodyTwo =
        DocumentBodyFactory.create(
            FileUtils.readFileToByteArray(TestUtils.loadFixture(documentTwoFile)));

    CouchClientWrapperDbUtils.deleteDbQuietly(remoteDb);
    remoteDb.createDatabase();
  }
コード例 #3
0
 @After
 public void tearDown() {
   CouchClientWrapperDbUtils.deleteDbQuietly(remoteDb);
 }