public void Matches_JValueWithString_ReturnsTrue() { JsonConstraint constraint = new OfTypeStringConstraint(); Assert.That(constraint.Matches(new JValue("Im a string"), null), Is.True); }
public void Matches_JObject_ReturnsFalse() { JsonConstraint constraint = new OfTypeStringConstraint(); Assert.That(constraint.Matches(new JObject(), null), Is.False); }
public void Matches_JValueWithNumber_ReturnsFalse() { JsonConstraint constraint = new OfTypeStringConstraint(); Assert.That(constraint.Matches(new JValue(42), null), Is.False); }
public void Describe_ReturnsDescribtion() { JsonConstraint constraint = new OfTypeStringConstraint(); Assert.That(constraint.Describe().ToString(), Is.EqualTo("of type string")); }