internal RO0_Permition( #if !NET_1_1 DO_Permition #else DO0_Permition #endif parent_ref_in ) : base( parent_ref_in ) { parent_ref_ = parent_ref_in; }
internal RO0_Permition( #if USE_PARTIAL_CLASSES && !NET_1_1 DO_Permition #else DO0_Permition #endif parent_ref_in ) : base( parent_ref_in ) { parent_ref_ = parent_ref_in; }
public void UT_InsGetDelSequence() { DO_Permition _permition; try { _permition = new DO_Permition(); } catch (Exception e) { Assert.IsTrue(false, "some error trying to instantiate DO_Permition\n---\n{0}\n---", e.Message); return; // no need... } _permition.Connection.Open(); _permition.Connection.Transaction.Begin(); _permition.Fields.Name = "123"; long _idpermition; try { _idpermition = _permition.insObject(true); } catch (Exception e) { Assert.IsTrue(false, "some error running insObject\n---\n{0}\n---", e.Message); return; // no need... } Assert.IsTrue(_idpermition > 0L, "failed to retrieve identity seed (insObject)"); _permition.clrObject(); bool _exists; try { _exists = _permition.getObject(_idpermition); } catch (Exception e) { Assert.IsTrue(false, "some error running getObject\n---\n{0}\n---", e.Message); return; // no need... } Assert.IsTrue(_exists, "can't read inserted item (getObject)"); Assert.AreEqual("123", _permition.Fields.Name, "inserted values difer those just read (insObject/getObject)"); try { _permition.delObject(_idpermition); } catch (Exception e) { Assert.IsTrue(false, "some error trying to delete (delObject)\n---\n{0}\n---", e.Message); return; // no need... } _permition.Connection.Transaction.Rollback(); _permition.Connection.Transaction.Terminate(); _permition.Connection.Close(); _permition.Dispose(); _permition = null; }