public void Equals_Check(string testValue1, string testValue2, bool expected) { var comparer = new StringComparer(); var result = comparer.Equals(testValue1, testValue2); Assert.Equal(expected, result); }
public ManufacturerComparer() { _stringComparer = new StringComparer(); _guidComparer = new NullableStructComparer <Guid>(); _contactsTypeComparer = new CollectionTypeComparer <ContactDto, ContactComparer>(); _bothNullOrNotNullComparer = new BothNullOrNotNullComparer(); }
public void GetHashCode_ZeroCheck(string testValue, bool expected) { var comparer = new StringComparer(); var hasCode = comparer.GetHashCode(testValue); var result = hasCode == 0; Assert.Equal(expected, result); }
public ContactComparer() { _stringComparer = new StringComparer(); _guidComparer = new NullableStructComparer <Guid>(); _contactTypeComparer = new NullableStructComparer <ContactType>(); _intComparer = new NullableStructComparer <int>(); _bothNullOrNotNullComparer = new BothNullOrNotNullComparer(); }
public CarComparer() { _stringComparer = new StringComparer(); _guidComparer = new NullableStructComparer <Guid>(); _decimalComparer = new NullableStructComparer <decimal>(); _dateTimeComparer = new NullableStructComparer <DateTime>(); _manufacturerComparer = new ManufacturerComparer(); _bothNullOrNotNullComparer = new BothNullOrNotNullComparer(); _codesComparer = new CollectionComparer <string, StringComparer>(); }
public void GetHashCode_Null_Throws() { var comparer = new StringComparer(); Assert.Throws <ArgumentNullException>(() => comparer.GetHashCode(null)); }