public void Serialize_ShouldReturnValidResult()
        {
            // Arrange.
            var target = new BinaryUnicodeSerializer();
            var obserializationTargetj = "aZ09`ಮ";

            // Act.
            var result = target.Serialize(obserializationTargetj);

            // Assert.
            result.Should().BeEquivalentTo(Encoding.Unicode.GetBytes(obserializationTargetj));
        }
        public void Serialize_ShouldBeReversible()
        {
            // Arrange.
            var target = new BinaryUnicodeSerializer();
            var serializationTarget = "aZ09`ಮ";

            // Act.
            var serializeResult   = target.Serialize(serializationTarget);
            var deserializeResult = target.Deserialize(serializeResult);

            // Assert.
            deserializeResult.Should().BeEquivalentTo(serializationTarget);
        }
        public void Serialize_ShouldRaiseArgumentNullException_ForNullObjArgument()
        {
            // Arrange.
            var target = new BinaryUnicodeSerializer();
            var serializationTarget = (String)null;

            // Act.
            var action = new Action(() =>
            {
                var result = target.Serialize(serializationTarget);
            });

            // Assert.
            action.Should().Throw <ArgumentNullException>();
        }