コード例 #1
0
        public void Throw_ArgumentException_If_Passed_Values_Is_Null(string x, string y)
        {
            var comparer = new PrefixStringComparer();

            Action compareAction = () => comparer.Compare(x, y);

            compareAction.Should().Throw <ArgumentException>().And.Message.Should().Be("Passed string could not be null");
        }
コード例 #2
0
        public void TestCompares(string x, string y, int expectedResult)
        {
            var comparer = new PrefixStringComparer();

            var result = comparer.Compare(x, y);

            result.Should().Be(expectedResult);
        }