buildCreateFolderQuery() private method

private buildCreateFolderQuery ( domain folder ) : OracleQuery
folder domain
return OracleQuery
Ejemplo n.º 1
0
        public void testCreateFolderSql()
        {
            FolderDao dao = new FolderDao(new MdoOracleConnection(new DataSource() { ConnectionString = "MyCxnString" }));
            OracleQuery result = dao.buildCreateFolderQuery(new domain.sm.Folder() { Id = 1, Name = "New Folder Name", Owner = new domain.sm.User() { Id = 2 } });

            Assert.IsNotNull(result);
            Assert.AreEqual("INSERT INTO SMS.FOLDER (USER_ID, FOLDER_NAME) VALUES (:userId, :folderName) RETURNING FOLDER_ID INTO :outId", result.Command.CommandText);
        }
Ejemplo n.º 2
0
        public void testCreateFolderSql()
        {
            FolderDao dao = new FolderDao(new MdoOracleConnection(new DataSource()
            {
                ConnectionString = "MyCxnString"
            }));
            OracleQuery result = dao.buildCreateFolderQuery(new domain.sm.Folder()
            {
                Id = 1, Name = "New Folder Name", Owner = new domain.sm.User()
                {
                    Id = 2
                }
            });

            Assert.IsNotNull(result);
            Assert.AreEqual("INSERT INTO SMS.FOLDER (USER_ID, FOLDER_NAME) VALUES (:userId, :folderName) RETURNING FOLDER_ID INTO :outId", result.Command.CommandText);
        }