Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        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]);
        }
Exemplo n.º 3
0
 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]);
 }