Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Sound & Video
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook

Mockingbird

Tutorials

  • WritingMockTestsWithMockingbird

Guides

  • Mockingbird

Symbols

  • MockDefinitionGroup
  • MockDefinition
  • MockEvaluate
  • MockEvaluateReap
  • MockPropertyValuePatternTest
  • MockPropertyValueQ
  • MockSow
Wolfram`Mockingbird`
MockPropertyValueQ
​
MockPropertyValueQ[expr,{
prop
1

patt
1
,…}]
yields
True
if all of the rules
prop
i

patt
i
match property names and values of
expr
.
​
MockPropertyValueQ[rules]
​ represents an operator form of
MockPropertyValueQ
that can be applied to an expression.
Details

Examples  
(3)
Basic Examples  
(1)
In[1]:=
Needs["Wolfram`Mockingbird`"]
Test that an
HTTPResponse
expression has status code 200:
In[2]:=
res=URLRead["http://www.wolframalpha.com/"]​​res["StatusCode"]
Out[2]=
HTTPResponse
Status: OK
Content type: text/html; charset=utf-8

Out[2]=
200
In[3]:=
MockPropertyValueQ
[res,{"StatusCode"->200}]
Out[3]=
True
Each
patt
1
in the list of rules is matched against as a pattern:
In[4]:=
MockPropertyValueQ
[res,{"StatusCode"->_Integer?(LessThan[300]),"Version"->_String}]
Out[4]=
True
In[5]:=
MockPropertyValueQ
[res,{"StatusCode"->_Real}]
Out[5]=
False
Properties & Relations  
(1)

Possible Issues  
(1)

SeeAlso
MockPropertyValuePatternTest
 
▪
KeyValuePattern
TechNotes
▪
Writing Mock Tests with Mockingbird
RelatedGuides
▪
Mockingbird
▪
Writing Mock Tests with Mockingbird

© 2023 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com