@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); }
@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")); }