Beispiel #1
0
        public void GivenASearchValue_WhenCompareWithStringSearchValue_ThenCorrectResultIsReturned(string original, string given, int expectedResult)
        {
            StringSearchValue originalValue = new StringSearchValue(original);
            StringSearchValue givenValue    = new StringSearchValue(given);

            int result = originalValue.CompareTo(givenValue, ComparisonRange.Max);

            Assert.Equal(expectedResult, result);
        }
Beispiel #2
0
        public void GivenAStringSearchValue_WhenCompareWithNull_ThenArgumentExceptionIsThrown()
        {
            StringSearchValue value = new StringSearchValue("string");

            Assert.Throws <ArgumentException>(() => value.CompareTo(null, ComparisonRange.Max));
        }