コード例 #1
0
        public void DynamoParseException()
        {
            var text = @"{""__type"":""com.amazon.coral.service#SerializationException"",""Message"":""Start of list found where not expected""}";

            var ex = DynamoDbException.Parse(text);

            Assert.Equal("SerializationException", ex.Type);
            Assert.Equal("Start of list found where not expected", ex.Message);
        }
コード例 #2
0
        public void DynamoParseException_Lowercase()
        {
            var text = @"{""__type"":""Exception"",""message"":""Something went wrong""}";

            var ex = DynamoDbException.Parse(text);

            Assert.Equal("Exception", ex.Type);
            Assert.Equal("Something went wrong", ex.Message);
        }
コード例 #3
0
        public async Task DynamoParseException_Lowercase()
        {
            var text = @"{""__type"":""Exception"",""message"":""Something went wrong""}";

            var ms = new MemoryStream(Encoding.UTF8.GetBytes(text));

            var ex = await DynamoDbException.DeserializeAsync(ms);

            Assert.Equal("Exception", ex.Type);
            Assert.Equal("Something went wrong", ex.Message);
        }
コード例 #4
0
        public async Task DynamoParseException()
        {
            var text = @"{""__type"":""com.amazon.coral.service#SerializationException"",""Message"":""Start of list found where not expected""}";

            var ms = new MemoryStream(Encoding.UTF8.GetBytes(text));

            var ex = await DynamoDbException.DeserializeAsync(ms);

            Assert.Equal("SerializationException", ex.Type);
            Assert.Equal("Start of list found where not expected", ex.Message);
        }