public void SubstrStartNoCount() { var rule = new SubstrRule("foobar", 3); JsonAssert.AreEquivalent("bar", rule.Apply()); }
public void SubstrStartNegativeCountBeyondLength() { var rule = new SubstrRule("foobar", 2, -10); JsonAssert.AreEquivalent(string.Empty, rule.Apply()); }
public void SubstrStartCountBeyondLength() { var rule = new SubstrRule("foobar", 3, 5); JsonAssert.AreEquivalent("bar", rule.Apply()); }
public void SubstrStartNegativeCount() { var rule = new SubstrRule("foobar", 2, -1); JsonAssert.AreEquivalent("oba", rule.Apply()); }
public void SubstrNegativeStartBeyondLengthNoCount() { var rule = new SubstrRule("foobar", -10); JsonAssert.AreEquivalent("foobar", rule.Apply()); }