Пример #1
0
        public void Wrap()
        {
            IBlob testSubject = new JdbcBlob();

            if (testSubject.CanWrap)
            {
                if (testSubject.CanWrapType(typeof(byte[])))
                {
                    testSubject.Wrap(new byte[] { 1, 2, 3, 4 });
                }

                testSubject = new JdbcBlob();

                if (testSubject.CanWrapType(typeof(Stream)))
                {
                    testSubject.Wrap(new MemoryStream(new byte[] { 1, 2, 3, 4 }));
                }

                testSubject = new JdbcBlob();

                if (testSubject.CanWrapType(typeof(java.sql.Blob)))
                {
                    java.sql.Blob blob = new org.hsqldb.jdbc.jdbcBlob(new byte[] { 1, 2, 3, 4 });

                    testSubject.Wrap(blob);
                }
            }
        }
Пример #2
0
        public void Wrap()
        {
            IBlob testSubject = new JdbcBlob();

            if (testSubject.CanWrap)
            {
                if (testSubject.CanWrapType(typeof(Stream)))
                {
                    testSubject.Wrap(new MemoryStream(new byte[] {
                        (byte)'1', (byte)'2', (byte)'3', (byte)'4'
                    }));
                }

                testSubject = new JdbcBlob();

                if (testSubject.CanWrapType(typeof(TextReader)))
                {
                    testSubject.Wrap(new StringReader("1234"));
                }

                testSubject = new JdbcBlob();

                if (testSubject.CanWrapType(typeof(string)))
                {
                    testSubject.Wrap("1234");
                }

                testSubject = new JdbcBlob();

                if (testSubject.CanWrapType(typeof(java.sql.Clob)))
                {
                    java.sql.Clob clob = new org.hsqldb.jdbc.jdbcClob("1234");

                    testSubject.Wrap(clob);
                }
            }
        }
        public void Wrap()
        {
            IBlob testSubject = new JdbcBlob();

            if (testSubject.CanWrap)
            {
                if (testSubject.CanWrapType(typeof(Stream)))
                {
                    testSubject.Wrap(new MemoryStream(new byte[] {
                        (byte)'1', (byte)'2', (byte)'3', (byte)'4' }));
                }

                testSubject = new JdbcBlob();

                if (testSubject.CanWrapType(typeof(TextReader)))
                {
                    testSubject.Wrap(new StringReader("1234"));
                }

                testSubject = new JdbcBlob();

                if (testSubject.CanWrapType(typeof(string)))
                {
                    testSubject.Wrap("1234");
                }

                testSubject = new JdbcBlob();

                if (testSubject.CanWrapType(typeof(java.sql.Clob)))
                {
                    java.sql.Clob clob = new org.hsqldb.jdbc.jdbcClob("1234");

                    testSubject.Wrap(clob);
                }
            }
        }
        public void Wrap()
        {
            IBlob testSubject = new JdbcBlob();

            if (testSubject.CanWrap)
            {
                if (testSubject.CanWrapType(typeof(byte[])))
                {
                    testSubject.Wrap(new byte[] { 1, 2, 3, 4 });
                }

                testSubject = new JdbcBlob();

                if (testSubject.CanWrapType(typeof(Stream)))
                {
                    testSubject.Wrap(new MemoryStream(new byte[] { 1, 2, 3, 4 }));
                }

                testSubject = new JdbcBlob();

                if (testSubject.CanWrapType(typeof(java.sql.Blob)))
                {
                    java.sql.Blob blob = new org.hsqldb.jdbc.jdbcBlob(new byte[] { 1, 2, 3, 4 });

                    testSubject.Wrap(blob);
                }
            }
        }