TF-3278 Handle open app via deep link at MailboxDashboard screen

This commit is contained in:
dab246
2024-11-22 23:30:37 +07:00
committed by Dat H. Pham
parent 8022559bc2
commit 223fdbf1fb
59 changed files with 1058 additions and 429 deletions
+36
View File
@@ -5,6 +5,42 @@ import 'package:core/utils/string_convert.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
group('StringConvert::decodeBase64ToString::test', () {
test('should decode a valid Base64 string to a normal string', () {
// Arrange
const base64Encoded = 'SGVsbG8gV29ybGQh';
const expectedDecoded = 'Hello World!';
// Act
final result = StringConvert.decodeBase64ToString(base64Encoded);
// Assert
expect(result, expectedDecoded);
});
test('should return the original string for invalid Base64 input', () {
// Arrange
const invalidBase64 = 'InvalidBase64@@';
// Act
final result = StringConvert.decodeBase64ToString(invalidBase64);
// Assert
expect(result, invalidBase64);
});
test('should return the original string for empty input', () {
// Arrange
const emptyInput = '';
// Act
final result = StringConvert.decodeBase64ToString(emptyInput);
// Assert
expect(result, emptyInput);
});
});
group('StringConvert::extractStrings::', () {
group('Basic Functionality', () {
test('should extract strings separated by spaces', () {