diff --git a/test/scripting_api/interaction_input_test.dart b/test/scripting_api/interaction_input_test.dart index 341d6690..e7ec0719 100644 --- a/test/scripting_api/interaction_input_test.dart +++ b/test/scripting_api/interaction_input_test.dart @@ -56,6 +56,40 @@ void main() { DataSchemaValue.fromInteger(testValue), ); }); + + test('from Number', () { + const testValue = 42.0; + final interactionInput = InteractionInput.fromNumber(testValue); + + expect(interactionInput, isA()); + + expect( + (interactionInput as DataSchemaValueInput).dataSchemaValue, + isA(), + ); + + expect( + interactionInput.dataSchemaValue, + DataSchemaValue.fromNumber(testValue), + ); + }); + + test('from boolean', () { + const testValue = true; + final interactionInput = InteractionInput.fromBoolean(testValue); + + expect(interactionInput, isA()); + + expect( + (interactionInput as DataSchemaValueInput).dataSchemaValue, + isA(), + ); + + expect( + interactionInput.dataSchemaValue, + DataSchemaValue.fromBoolean(testValue), + ); + }); }); }); }