From 4d464fa4bf7cce6be3d83aa53b05f67e7b48a526 Mon Sep 17 00:00:00 2001 From: hendrikvanderkaaden Date: Thu, 29 Feb 2024 11:12:02 +0100 Subject: [PATCH] Deleted test that was not relevant. --- floor_annotation/lib/src/type_converters.dart | 4 +- .../test/processor/entity_processor_test.dart | 44 ------------------- 2 files changed, 2 insertions(+), 46 deletions(-) diff --git a/floor_annotation/lib/src/type_converters.dart b/floor_annotation/lib/src/type_converters.dart index ba401e4d..859a52c5 100644 --- a/floor_annotation/lib/src/type_converters.dart +++ b/floor_annotation/lib/src/type_converters.dart @@ -22,7 +22,7 @@ import 'package:meta/meta.dart'; @experimental class TypeConverters { /// The list of type converter classes. - final List value; + final List? value; - const TypeConverters({this.value = const []}); + const TypeConverters(this.value); } diff --git a/floor_generator/test/processor/entity_processor_test.dart b/floor_generator/test/processor/entity_processor_test.dart index 1e8fd133..9bd37824 100644 --- a/floor_generator/test/processor/entity_processor_test.dart +++ b/floor_generator/test/processor/entity_processor_test.dart @@ -279,50 +279,6 @@ void main() { ); expect(actual, equals(expected)); }); - - test('error with wrong onUpdate Annotation', () async { - final classElements = await _createClassElements(''' - @entity - class Person { - @primaryKey - final int id; - - final String name; - - Person(this.id, this.name); - } - - @Entity( - foreignKeys: [ - ForeignKey( - childColumns: ['owner_id'], - parentColumns: ['id'], - entity: Person, - onUpdate: null - onDelete: ForeignKeyAction.setNull, - ) - ], - ) - class Dog { - @primaryKey - final int id; - - final String name; - - @ColumnInfo(name: 'owner_id') - final int ownerId; - - Dog(this.id, this.name, this.ownerId); - } - '''); - - final processor = EntityProcessor(classElements[1], {}); - expect( - processor.process, - throwsInvalidGenerationSourceError( - EntityProcessorError(classElements[1]).wrongForeignKeyAction( - FakeDartObject(), ForeignKeyField.onUpdate))); - }); }); group('fts keys', () {