blob: 658027a58b3612b4b325be9d098721b9ac72bb9c [file] [log] [blame]
import 'dart:convert';
import 'package:convert/convert.dart';
import 'package:test/test.dart';
void main() {
group('IdentityCodec', () {
test('encode', () {
final codec = IdentityCodec<String>();
expect(codec.encode('hello-world'), equals('hello-world'));
});
test('decode', () {
final codec = IdentityCodec<String>();
expect(codec.decode('hello-world'), equals('hello-world'));
});
test('fuse', () {
final stringCodec = IdentityCodec<String>();
final utf8Strings = stringCodec.fuse(utf8);
expect(utf8Strings, equals(utf8));
});
});
}