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()); }
public WidgetBase GetWidget(QuestionUnit unit, YesnoWrapper typeWrapper) { unit.InitialiseValue(typeWrapper); return new YesNoWidget(unit); }
public bool Equals(YesnoWrapper obj) { return Value == obj.Value; }
protected static bool ContainsNullValue(YesnoWrapper a, YesnoWrapper b) { return ReferenceEquals(a, null) || ReferenceEquals(b, null) || ReferenceEquals(null, a.Value) || ReferenceEquals(null, b.Value); }
protected static bool ContainsNullValue(YesnoWrapper a, YesnoWrapper b) { return(ReferenceEquals(a, null) || ReferenceEquals(b, null) || ReferenceEquals(null, a.Value) || ReferenceEquals(null, b.Value)); }
public bool Equals(YesnoWrapper obj) { return(Value == obj.Value); }