コード例 #1
0
  @Before
  public void setUpTestObject() throws IOException {
    tableProvider = new StoreableTableProvider(sandBoxDirectory);

    List<Class<?>> typesTestListOne =
        WorkWithStoreableDataBase.createListOfTypesFromString("int int int");
    List<Class<?>> typesTestListTwo =
        WorkWithStoreableDataBase.createListOfTypesFromString("int double boolean String");

    testTableEng = tableProvider.createTable("testTable20", typesTestListOne);
    testTableRus = tableProvider.createTable("тестоваяТаблица21", typesTestListTwo);
  }
コード例 #2
0
 @Test
 public void getRemoved() throws IOException {
   provider.createTable("table", types);
   Thread newThread =
       new Thread() {
         public void run() {
           try {
             provider.removeTable("table");
           } catch (IOException e) {
             Assert.fail(e.getMessage());
           }
         }
       };
   try {
     newThread.start();
     newThread.join();
   } catch (InterruptedException e) {
     Assert.fail(e.getMessage());
   }
   Assert.assertNull("error: should be no table", provider.getTable("table"));
 }