use of com.yydcdut.note.model.dao.CategoryDB in project PhotoNoter by yydcdut.
the class CategoryDBTest method testUpdateCategory.
public void testUpdateCategory() {
CategoryDB categoryDB = new CategoryDB(this.getInstrumentation().getTargetContext());
List<Category> categoryList = categoryDB.findAll();
Category category = categoryList.get(0);
category.setLabel("789456");
mRxCategory.updateCategory(category).subscribe(new Subscriber<List<Category>>() {
@Override
public void onCompleted() {
YLog.i("yuyidong", "onCompleted");
}
@Override
public void onError(Throwable e) {
YLog.i("yuyidong", "onError,,,e--->" + e.getMessage());
}
@Override
public void onNext(List<Category> categories) {
YLog.i("yuyidong", "categories.size()--->" + categories.size());
for (Category category : categories) {
YLog.i("yuyidong", category.toString());
}
}
});
}
Aggregations