예제 #1
0
        public void testStreamWithDeferedProperties()
        {
            log.info("testStreamWithDeferedProperties(");

            BContentStream bstrm = (BContentStream)remote.GetStreamDeferedProperies();

            TestUtils.assertEquals(log, "contentType", "", bstrm.ContentType);
            TestUtils.assertEquals(log, "contentLength", -1L, bstrm.ContentLength);
            TestUtils.assertEquals(log, "fileName", "", bstrm.FileName);
            TestUtils.assertEquals(log, "attachmentCode", 0, bstrm.AttachmentCode);

            bstrm.ensureProperties();
            TestUtils.assertEquals(log, "contentType", "application/mycontentype", bstrm.ContentType);
            TestUtils.assertEquals(log, "contentLength", 5L, bstrm.ContentLength);
            TestUtils.assertEquals(log, "fileName", "myfilename", bstrm.FileName);
            TestUtils.assertEquals(log, "attachmentCode", BContentStream.ATTACHMENT, bstrm.AttachmentCode);

            log.info(")testStreamWithDeferedProperties");
        }
 public override void execute(BRemote __byps__remote, BAsyncResultIF <Object> __byps__asyncResult)
 {
     // checkpoint byps.gen.cs.GenApiClass:413
     try {
         RemoteStreams __byps__remoteT = (RemoteStreams)__byps__remote;
         BAsyncResultSendMethod <System.IO.Stream> __byps__outerResult = new BAsyncResultSendMethod <System.IO.Stream>(__byps__asyncResult, new byps.test.api.BResult_15());
         __byps__remoteT.GetStreamDeferedProperies(BAsyncResultHelper.ToDelegate(__byps__outerResult));
     } catch (Exception e) {
         __byps__asyncResult.setAsyncResult(null, e);
     }
 }