Пример #1
0
        public void ReturnBytes(nRpc.Serializer serializer)
        {
            var result = serializer.Serialize(new AnyObject());

            result.Should().NotBeNull();
            result.Length.Should().NotBe(0);
        }
Пример #2
0
        public void ReturnType(nRpc.Serializer serializer)
        {
            var serialized = serializer.Serialize(new AnyObject());
            var result     = serializer.Deserialize <AnyObject>(serialized);

            result.Should().BeOfType <AnyObject>();
            result.Should().NotBeNull();
        }
Пример #3
0
        public void ThrowArgumentNullException_WhenObjectIsNull(nRpc.Serializer serializer)
        {
            Action action = () => serializer.Deserialize <object>(null);

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