Beispiel #1
0
        public void ShouldReturnTheSameProviderWhenKeyIsNotString()
        {
            //Arrange
            var sut = new EqualityServiceProvider <int>();

            //Act
            var result = sut.GetKeyComparer(Comparer <int> .Default);

            //Assert
            Assert.That(result.GetType(), Is.Not.EqualTo(StringComparer.InvariantCultureIgnoreCase.GetType()));
        }
Beispiel #2
0
        public void ShouldReturnCaseInsensitiveComparerWhenKeyIsAString()
        {
            //Arrange
            var sut = new EqualityServiceProvider <string>();

            //Act
            var result = sut.GetKeyComparer(Comparer <string> .Default);

            //Assert
            Assert.That(result.GetType(), Is.EqualTo(StringComparer.InvariantCultureIgnoreCase.GetType()));
        }