Beispiel #1
0
    public void HandlesNegatives()
    {
        var input  = "1,2,3,4,s,-2";
        var output = new ParsesStringToIntsWithLinq().Parse(input);

        Assert.IsTrue(output.SequenceEqual(new[] { 1, 2, 3, 4, -2 }));
    }
Beispiel #2
0
    public void IgnoresNonIntegers()
    {
        var input  = "1,2,3,4,s,6";
        var output = new ParsesStringToIntsWithLinq().Parse(input);

        Assert.IsTrue(output.SequenceEqual(new [] { 1, 2, 3, 4, 6 }));
    }