Beispiel #1
0
        public virtual void TestAddressUseOrdering()
        {
            TelecommunicationAddress address = new TelecommunicationAddress();

            address.AddAddressUse(Ca.Infoway.Messagebuilder.Domainvalue.Basic.TelecommunicationAddressUse.WORKPLACE);
            address.AddAddressUse(Ca.Infoway.Messagebuilder.Domainvalue.Basic.TelecommunicationAddressUse.EMERGENCY_CONTACT);
            address.AddAddressUse(Ca.Infoway.Messagebuilder.Domainvalue.Basic.TelecommunicationAddressUse.ANSWERING_MACHINE);
            address.AddAddressUse(Ca.Infoway.Messagebuilder.Domainvalue.Basic.TelecommunicationAddressUse.DIRECT);
            IEnumerator <Ca.Infoway.Messagebuilder.Domainvalue.TelecommunicationAddressUse> i = address.AddressUses.GetEnumerator();

            i.MoveNext();
            //for sharpen .NET mapping
            Assert.AreEqual(i.Current.CodeValue, Ca.Infoway.Messagebuilder.Domainvalue.Basic.TelecommunicationAddressUse.ANSWERING_MACHINE
                            .CodeValue);
            i.MoveNext();
            //for sharpen .NET mapping
            Assert.AreEqual(i.Current.CodeValue, Ca.Infoway.Messagebuilder.Domainvalue.Basic.TelecommunicationAddressUse.DIRECT.CodeValue
                            );
            i.MoveNext();
            //for sharpen .NET mapping
            Assert.AreEqual(i.Current.CodeValue, Ca.Infoway.Messagebuilder.Domainvalue.Basic.TelecommunicationAddressUse.EMERGENCY_CONTACT
                            .CodeValue);
            i.MoveNext();
            //for sharpen .NET mapping
            Assert.AreEqual(i.Current.CodeValue, Ca.Infoway.Messagebuilder.Domainvalue.Basic.TelecommunicationAddressUse.WORKPLACE.CodeValue
                            );
        }
Beispiel #2
0
        public virtual void TestTelecomAddressEquals()
        {
            TelecommunicationAddress telecomAddress1 = new TelecommunicationAddress();

            telecomAddress1.Address   = "192.168.0.27";
            telecomAddress1.UrlScheme = Ca.Infoway.Messagebuilder.Domainvalue.Basic.URLScheme.HTTP;
            telecomAddress1.AddAddressUse(Ca.Infoway.Messagebuilder.Domainvalue.Basic.TelecommunicationAddressUse.ANSWERING_MACHINE);
            TelecommunicationAddress telecomAddress2 = new TelecommunicationAddress();

            telecomAddress2.Address   = "192.168.0.27";
            telecomAddress2.UrlScheme = Ca.Infoway.Messagebuilder.Domainvalue.Basic.URLScheme.HTTP;
            telecomAddress2.AddAddressUse(Ca.Infoway.Messagebuilder.Domainvalue.Basic.TelecommunicationAddressUse.ANSWERING_MACHINE);
            Assert.AreEqual(telecomAddress1, telecomAddress2);
        }