public void TypeConverterAttributeConstructor() { tlog.Debug(tag, $"TypeConverterAttributeConstructor START"); var testingTarget = new TypeConverterAttribute("string"); Assert.IsNotNull(testingTarget, "Can't create success object TypeConverterAttribute."); Assert.IsInstanceOf <TypeConverterAttribute>(testingTarget, "Should return TypeConverterAttribute instance."); Assert.AreEqual("string", testingTarget.ConverterTypeName, "Should be equal"); var testingTarget2 = new TypeConverterAttribute(typeof(string)); Assert.IsNotNull(testingTarget2, "Can't create success object TypeConverterAttribute."); Assert.IsInstanceOf <TypeConverterAttribute>(testingTarget2, "Should return TypeConverterAttribute instance."); Assert.AreEqual(typeof(string).AssemblyQualifiedName, testingTarget2.ConverterTypeName, "Should be equal"); Assert.AreEqual(typeof(string).AssemblyQualifiedName.GetHashCode(), testingTarget2.GetHashCode(), "Should be equal"); tlog.Debug(tag, $"TypeConverterAttributeConstructor END"); }
public void GetHashCode_Invoke_ReturnsExpected() { var attribute = new TypeConverterAttribute("typeName"); Assert.Equal("typeName".GetHashCode(), attribute.GetHashCode()); }