コード例 #1
0
        public void TryMatchMediaType_DoesntMatchRequest_WithNonODataRequest(ODataRawValueMediaTypeMapping mapping)
        {
            // Arrange
            var request = RequestFactory.Create(HttpMethod.Get, "http://localhost/");

            // Act
            double mapResult = mapping.TryMatchMediaType(request);

            // Assert
            Assert.Equal(0, mapResult);
        }
コード例 #2
0
 public void TryMatchMediaType_ThrowsArgumentNull_WhenRequestIsNull(ODataRawValueMediaTypeMapping mapping)
 {
     // Arrange, Act & Assert
     ExceptionAssert.ThrowsArgumentNull(() => { mapping.TryMatchMediaType(null); }, "request");
 }