Index: recipes/test/core/strings/determining_if_string_is_empty_test.dart |
diff --git a/recipes/test/core/strings/determining_if_string_is_empty_test.dart b/recipes/test/core/strings/determining_if_string_is_empty_test.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..199655bbeabcf030b067e50dcb60528e9606a2c9 |
--- /dev/null |
+++ b/recipes/test/core/strings/determining_if_string_is_empty_test.dart |
@@ -0,0 +1,23 @@ |
+library determining_if_string_is_empty_test; |
+ |
+import 'package:unittest/unittest.dart'; |
+ |
+void main() { |
+ group('determining if string is empty', () { |
+ var emptyString = ''; |
+ var space = ' '; |
+ |
+ test('', () { |
+ expect(emptyString.isEmpty, isTrue); |
+ }); |
+ |
+ test('if string contains a space', () { |
+ expect(space.isEmpty, isFalse); |
+ }); |
+ |
+ test('by checking for equality', () { |
+ expect('' == 'u\2004', isFalse); |
+ }); |
+ }); |
+} |
+ |