// Copyright (C) 2023 WYATT GROUP // Please see the AUTHORS file for details. // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . import 'package:brick_generator/core/string_extension.dart'; import 'package:test/test.dart'; void main() { final expected = { 'camel_case': 'featureName', 'constant_case': 'FEATURE_NAME', 'dot_case': 'feature.name', 'header_case': 'Feature-Name', 'lower_case': 'feature name', 'pascal_case': 'FeatureName', 'param_case': 'feature-name', 'sentence_case': 'Feature name', 'title_case': 'Feature Name', 'upper_case': 'FEATURE NAME', 'snake_case': 'feature_name', }; test('transforms `feature_name`', () { const name = 'feature_name'; expect(name.syntaxes, equals(expected)); }); test('transforms `featureName`', () { const name = 'feature_name'; expect(name.syntaxes, equals(expected)); }); test('transforms `feature-Name`', () { const name = 'feature_name'; expect(name.syntaxes, equals(expected)); }); test('transforms `Feature Name`', () { const name = 'feature_name'; expect(name.syntaxes, equals(expected)); }); }