public void DomainTest() { var v = new VariableWrapper( "x", "XX" ); Assert.That( v.GetIndexDomain(), Is.EqualTo( -42 ) ); v.Domain = new Domain( -5 ); Assert.That( v.GetIndexDomain(), Is.EqualTo( -5 ) ); }
public void DomainTest() { var v = new VariableWrapper("x", "XX"); Assert.That(v.GetIndexDomain(), Is.EqualTo(-42)); v.Domain = new Domain(-5); Assert.That(v.GetIndexDomain(), Is.EqualTo(-5)); }
public void DomainTest() { var v = new VariableWrapper("x", "XX"); Assert.AreEqual(-42, v.GetIndexDomain()); v.Domain = new Domain(-5); Assert.AreEqual(-5, v.GetIndexDomain()); }
public void ConstructorsTest() { var v1 = new VariableWrapper( "a", "bb" ); var v2 = new VariableWrapper( "a", "bb" ); var v3 = new VariableWrapper( "a", "bb" ); Assert.That( v1.Name, Is.EqualTo( "a" ) ); Assert.That( v1.FullName, Is.EqualTo( "bb" ) ); Assert.That( v1.GetValue(), Is.EqualTo( -1 ) ); v1 = new VariableWrapper( "a", "bb", new Domain( 5, 0 ), 4 ); v2 = new VariableWrapper( "a", "bb", new Domain( 20, -4 ), -5 ); v3 = new VariableWrapper( "a", "bb", new Domain( 10, 1 ), -2 ); Assert.That( v1.GetValue(), Is.EqualTo( 4 ) ); Assert.That( v2.GetValue(), Is.EqualTo( -5 ) ); Assert.That( v3.GetValue(), Is.Zero ); }
public void ConstructorsTest() { var v1 = new VariableWrapper("a", "bb"); var v2 = new VariableWrapper("a", "bb"); var v3 = new VariableWrapper("a", "bb"); Assert.That(v1.Name, Is.EqualTo("a")); Assert.That(v1.FullName, Is.EqualTo("bb")); Assert.That(v1.GetValue(), Is.EqualTo(-1)); v1 = new VariableWrapper("a", "bb", new Domain(5, 0), 4); v2 = new VariableWrapper("a", "bb", new Domain(20, -4), -5); v3 = new VariableWrapper("a", "bb", new Domain(10, 1), -2); Assert.That(v1.GetValue(), Is.EqualTo(4)); Assert.That(v2.GetValue(), Is.EqualTo(-5)); Assert.That(v3.GetValue(), Is.Zero); }
public void ConstructorsTest() { var v1 = new VariableWrapper("a", "bb"); var v2 = new VariableWrapper("a", "bb"); var v3 = new VariableWrapper("a", "bb"); Assert.AreEqual("a", v1.Name); Assert.AreEqual("bb", v1.FullName); Assert.AreEqual(-1, v1.GetValue()); v1 = new VariableWrapper("a", "bb", new Domain(5, 0), 4); v2 = new VariableWrapper("a", "bb", new Domain(20, -4), -5); v3 = new VariableWrapper("a", "bb", new Domain(10, 1), -2); Assert.AreEqual(4, v1.GetValue()); Assert.AreEqual(-5, v2.GetValue()); Assert.AreEqual(0, v3.GetValue()); }
public void DomainFailTest() { var v = new VariableWrapper("x", "XX"); Assert.Throws <ArgumentException>(() => v.Domain = null); }
public void DomainFailTest() { var v = new VariableWrapper( "x", "XX" ); Assert.Throws<ArgumentException>(()=>v.Domain = null); }
public void DomainFailTest() { var v = new VariableWrapper("x", "XX"); v.Domain = null; }