public override bool Equals(object other) { if (!(other is NamedValueImplImpl)) { return(false); } NamedValueImplImpl otherCasted = (NamedValueImplImpl)other; return((m_value == otherCasted.m_value) && (m_name == otherCasted.m_name)); }
public void TestInterfaceImplementingValueTypeArray() { NamedValue[] arg = new NamedValue[] { new NamedValueImplImpl("name1", 1) }; NamedValue toAppend = new NamedValueImplImpl("name2", 2); NamedValue[] result = m_testService.TestAppendElementToNamedValueArray(arg, toAppend); Assertion.AssertNotNull(result); Assertion.AssertEquals(arg.Length + 1, result.Length); for (int i = 0; i < arg.Length; i++) { Assertion.AssertEquals(arg[i], result[i]); } Assertion.AssertEquals(toAppend, result[arg.Length]); }
public void TestInterfaceImplementingValueTypeArray() { NamedValue[] arg = new NamedValue[] { new NamedValueImplImpl("name1", 1) }; NamedValue toAppend = new NamedValueImplImpl("name2", 2); NamedValue[] result = m_testService.TestAppendElementToNamedValueArray(arg, toAppend); Assertion.AssertNotNull(result); Assertion.AssertEquals(arg.Length + 1, result.Length); for (int i = 0; i < arg.Length; i++) { Assertion.AssertEquals(arg[i], result[i]); } Assertion.AssertEquals(toAppend, result[arg.Length]); }