Esempio n. 1
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);
                }
            }
        }