Esempio n. 1
0
 public void TestGiopConnectionDescSetCodeSetNegotiated()
 {
     GiopConnectionDesc desc =
         new GiopConnectionDesc(null, null);
     desc.SetCodeSetNegotiated();
     Assert.IsTrue(
                      desc.IsCodeSetNegotiated(),"Codeset negotiated");
     Assert.IsTrue(
                      !desc.IsCodeSetDefined(),"Codeset not user defined");
 }
Esempio n. 2
0
 public void TestGiopConnectionDescCodeSetNotSetAccess()
 {
     GiopConnectionDesc desc =
         new GiopConnectionDesc(null, null);
     Assert.IsTrue(
                      !desc.IsCodeSetDefined(), "No codeset user defined at construction time");
     try
     {
         int charSet = desc.CharSet;
         Assert.Fail("Expected expection, when accessing charset, although not set");
     }
     catch (INTERNAL)
     {
         // expected.
     }
     try
     {
         int wcharSet = desc.WCharSet;
         Assert.Fail("Expected expection, when accessing charset, although not set");
     }
     catch (INTERNAL)
     {
         // expected.
     }
 }
Esempio n. 3
0
        public void TestGiopConnectionDescSetCodeSet()
        {
            int charSet = 0x5010001;
            int wcharSet = 0x10100;
            GiopConnectionDesc desc =
                new GiopConnectionDesc(null, null);
            desc.SetNegotiatedCodeSets(charSet, wcharSet);
            Assert.IsTrue(
                             desc.IsCodeSetNegotiated(),"Codeset negotiated");
            Assert.AreEqual(charSet, desc.CharSet,"char set");
            Assert.AreEqual(wcharSet, desc.WCharSet,"wchar set");
            Assert.IsTrue(desc.IsCodeSetDefined(),"Codeset user defined");

        }
Esempio n. 4
0
 public void TestGiopConnectionDescCodeSetNotSet()
 {
     GiopConnectionDesc desc =
         new GiopConnectionDesc(null, null);
     Assert.IsTrue(
                      !desc.IsCodeSetNegotiated(), "Codeset not negotiated at construction time");
     Assert.IsTrue(
                      !desc.IsCodeSetDefined(), "No codeset user defined at construction time");
 }