Beispiel #1
0
 public void SetGetValueTest()
 {
     // default index should be -1
     Assert.That(variable.GetValue(), Is.EqualTo(variable.Domain.OutsideScope));
     variable.SetValue(0);
     Assert.That(variable.GetValue(), Is.Zero);
     variable.SetValue(1);
     Assert.That(variable.GetValue(), Is.EqualTo(1));
     variable.SetValue(2);
     Assert.That(variable.GetValue(), Is.EqualTo(2));
     variable.SetValue(-1);
     Assert.That(variable.GetValue(), Is.EqualTo(variable.Domain.OutsideScope));
 }
Beispiel #2
0
 public void SetGetValueTest()
 {
     // default index should be -1
     Assert.AreEqual(variable.Domain.OutsideScope, variable.GetValue());
     variable.SetValue(0);
     Assert.AreEqual(0, variable.GetValue());
     variable.SetValue(1);
     Assert.AreEqual(1, variable.GetValue());
     variable.SetValue(2);
     Assert.AreEqual(2, variable.GetValue());
     variable.SetValue(-1);
     Assert.AreEqual(variable.Domain.OutsideScope, variable.GetValue());
 }