Hello guys,
In JNoSQL Drivers, we have to test a lot of things, like inserts, selects, updates and others. When we are testing a select statement we have to insert some records and now a days, we insert with a Template ou Reposity first and then, we test the select/delete feature, but the problem is that the tests are ugly.
For example (Delete with Redis Driver):
@Test
public void shouldRemoveList() {
fruits.add(orange);
fruits.add(banana);
fruits.add(waterMelon);
fruits.remove(waterMelon);
assertThat(fruits, not(contains(waterMelon)));
}
Now with JNoSQL Aphrodite we can improve ours tests with an annotation to do something (scripts with queries) before or after the tests. Something like:
@Query(“fruits.jnosql”)
@Test
public void shouldRemoveList() {
fruits.remove(waterMelon);
assertThat(fruits, not(contains(waterMelon)));
}
_______________________________________________
jnosql-dev mailing list
jnosql-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jnosql-dev