Skip to content
grahamrhay edited this page Nov 11, 2010 · 1 revision

#StringEndsWith

Matches if a string ends with another string:

    [Test]
    public void StringEndsWith()
    {
        var endsWithMat = new StringEndsWith("mat");
        const string actual = "the cat sat on the mat";

        Assert.That(actual, endsWithMat);
        // or alternatively
        Assert.That(actual, Ends.With("mat"));
    }
Clone this wiki locally