test/word_search: cover more functionality

This commit is contained in:
2025-06-24 19:32:42 +02:00
parent c32775ce7a
commit 189d4a95cf

View File

@@ -4,12 +4,42 @@ import 'package:test/test.dart';
import 'setup_database_connection.dart';
void main() {
test("Search a word", () async {
test("Search a word - english - auto", () async {
final connection = await setup_database_connection();
final result = await connection.jadbSearchWord("kana");
expect(result, isNotNull);
});
test("Get word search count - english - auto", () async {
final connection = await setup_database_connection();
final result = await connection.jadbSearchWordCount("kana");
expect(result, isNotNull);
});
test("Search a word - japanese kana - auto", () async {
final connection = await setup_database_connection();
final result = await connection.jadbSearchWord("かな");
expect(result, isNotNull);
});
test("Get word search count - japanese kana - auto", () async {
final connection = await setup_database_connection();
final result = await connection.jadbSearchWordCount("かな");
expect(result, isNotNull);
});
test("Search a word - japanese kanji - auto", () async {
final connection = await setup_database_connection();
final result = await connection.jadbSearchWord("仮名");
expect(result, isNotNull);
});
test("Get word search count - japanese kanji - auto", () async {
final connection = await setup_database_connection();
final result = await connection.jadbSearchWordCount("仮名");
expect(result, isNotNull);
});
test("Get a word by id", () async {
final connection = await setup_database_connection();
final result = await connection.jadbGetWordById(1577090);