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..ffe7a23d9b14952158e57383f99f2c1e00b87347 |
--- /dev/null |
+++ b/recipes/test/core/strings/determining_if_string_is_empty_test.dart |
@@ -0,0 +1,22 @@ |
+library determining_if_string_is_empty_test; |
+ |
+import 'package:unittest/unittest.dart'; |
+ |
+void main() { |
+ group('determining if string is empty', () { |
+ test('using isEmpty', () { |
+ expect(''.isEmpty, isTrue); |
+ }); |
+ |
+ test('using ==', () { |
+ var string = "asdf"; |
+ expect(string == "", equals(false)); |
+ }); |
+ |
+ test('if string contains a space', () { |
+ var space = ' '; |
+ expect(space.isEmpty, isFalse); |
+ }); |
+ }); |
+} |
+ |