Exemple #1
0
 public void AbortValueTest()
 {
     DataItem target = new DataItem(1);
     target.SetValue(5, 2, 1);
     target.AbortValue();
     Assert.IsNull(target.NewValueTransId);
     Assert.AreEqual(1, target.Value);
 }
Exemple #2
0
 public void CommitValueTest()
 {
     DataItem target = new DataItem(5);
     int timeStamp = 0;
     target.SetValue(10, 1, 1);
     target.CommitValue(timeStamp);
     Assert.IsNull(target.NewValueTransId);
     Assert.AreEqual(10, target.Value);
 }
Exemple #3
0
 public void SetValueTest()
 {
     DataItem target = new DataItem(5);
     int newVal = 0;
     int currentTimeStamp = 0;
     int transactionId = 0;
     target.SetValue(newVal, currentTimeStamp, transactionId);
     Assert.AreEqual(newVal, target.DirtyValue);
     Assert.AreEqual(transactionId, target.NewValueTransId);
     Assert.AreEqual(5, target.Value);
 }