Ejemplo n.º 1
0
        public void ToODataErrorDetail_HttpStatusCode_Message_Target()
        {
            var odataException   = new ODataException("Not Found", HttpStatusCode.NotFound, "target");
            var odataErrorDetail = odataException.ToODataErrorDetail();

            Assert.NotNull(odataErrorDetail);
            Assert.Equal(((int)odataException.StatusCode).ToString(), odataErrorDetail.Code);
            Assert.Equal(odataException.Message, odataErrorDetail.Message);
            Assert.Equal(odataException.Target, odataErrorDetail.Target);
        }