Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Support || and ?: in Mock.Of #86

Open
ashmind opened this Issue · 0 comments

1 participant

@ashmind

I think the x || a and x ? a : b should be supported in Mock.Of as long as x can be calculated immediately when mock is set up.

Example:

Mock.Of<INode>(
    m => m.GetProperty("p1").Value == p1
      && (p2 == null || m.GetProperty("p2").Value == p2)
      && (p3 == null || m.GetProperty("p3").Value == p3)
)

Here p1, p2 and p3 are external variables/parameters.
What should happen is if p2 == null, m.GetProperty("p2") is not mocked at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.