Exemple #1
0
        public void TryMatchMediaType_Matches(HttpRequestMessage request, double expectedMatch)
        {
            // Arrange
            XmlHttpRequestHeaderMapping mapping = new XmlHttpRequestHeaderMapping();

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

            // Assert
            Assert.Equal(expectedMatch, actualMatch);
        }
        public void TryMatchMediaType_Matches(HttpRequestMessage request, double expectedMatch)
        {
            // Arrange
            XmlHttpRequestHeaderMapping mapping = new XmlHttpRequestHeaderMapping();

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

            // Assert
            Assert.Equal(expectedMatch, actualMatch);
        }
Exemple #3
0
        public void TryMatchMediaType_ThrowsOnNull()
        {
            XmlHttpRequestHeaderMapping mapping = new XmlHttpRequestHeaderMapping();

            Assert.ThrowsArgumentNull(() => mapping.TryMatchMediaType(null), "request");
        }
 public void TryMatchMediaType_ThrowsOnNull()
 {
     XmlHttpRequestHeaderMapping mapping = new XmlHttpRequestHeaderMapping();
     Assert.ThrowsArgumentNull(() => mapping.TryMatchMediaType(null), "request");
 }