// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.

//import 'package:aitrainer_app/bloc/login_form_bloc.dart';
import 'package:aitrainer_app/helper/database.dart';
import 'package:aitrainer_app/library_keys.dart';
import 'package:aitrainer_app/util/app_localization.dart';
import 'package:aitrainer_app/model/user.dart';
import 'package:aitrainer_app/repository/user_repository.dart';
import 'package:aitrainer_app/util/common.dart';
import 'package:aitrainer_app/view/login.dart';
import 'package:bloc_test/bloc_test.dart';
import 'package:flutter/material.dart';

import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mockito/mockito.dart';

void main() {
  group('SQFLite', () {
    setUp(() async {
      await DB().initDb();
    });

    tearDown(() async {
      await DB().closeDb();
    });

    testWidgets('Test database table', (WidgetTester tester) async {
      var result = await DB().getDB().rawQuery('SELECT * FROM Customer');
      expect(result, [
        {'col1': 2, 'col2': 2}
      ]);
    });
  });
}
