Example #1
0
        public void EvaluatedValueComparisson()
        {
            YesnoWrapper yes = new YesnoWrapper(true);
            YesnoWrapper no = new YesnoWrapper(false);
            NumberWrapper a = new NumberWrapper(12345);
            NumberWrapper b = new NumberWrapper(12345);

            Assert.IsTrue((a == b).ToBool());
            Number n = new Number();
            n.Value = 12345;
            NumberWrapper c = new NumberWrapper(n);
            Assert.IsTrue((c == a).ToBool());
            Assert.IsFalse((c != a).ToBool());

            b.Value = 23456;
            Assert.IsFalse((c == b).ToBool());
            Assert.IsTrue((c != b).ToBool());
        }
Example #2
0
 public WidgetBase GetWidget(QuestionUnit unit, YesnoWrapper typeWrapper)
 {
     unit.InitialiseValue(typeWrapper);
     return new YesNoWidget(unit);
 }
Example #3
0
 public bool Equals(YesnoWrapper obj)
 {
     return Value == obj.Value;
 }
Example #4
0
 protected static bool ContainsNullValue(YesnoWrapper a, YesnoWrapper b)
 {
     return ReferenceEquals(a, null) || ReferenceEquals(b, null) || ReferenceEquals(null, a.Value) || ReferenceEquals(null, b.Value);
 }
Example #5
0
 protected static bool ContainsNullValue(YesnoWrapper a, YesnoWrapper b)
 {
     return(ReferenceEquals(a, null) || ReferenceEquals(b, null) || ReferenceEquals(null, a.Value) || ReferenceEquals(null, b.Value));
 }
Example #6
0
 public bool Equals(YesnoWrapper obj)
 {
     return(Value == obj.Value);
 }