public void TestBothNull() { _comparer = new ReflectedPropertyComparer<MultiPropBO>("IntProp"); _boCol.Sort(_comparer); Assert.IsNull(_boCol[0].IntProp); Assert.IsNull(_boCol[1].IntProp); }
public void TestBothNull() { _comparer = new ReflectedPropertyComparer <MultiPropBO>("IntProp"); _boCol.Sort(_comparer); Assert.IsNull(_boCol[0].IntProp); Assert.IsNull(_boCol[1].IntProp); }
public void TestInt() { _comparer = new ReflectedPropertyComparer <MultiPropBO>("IntProp"); _boCol[0].IntProp = 2; _boCol[1].IntProp = 1; _boCol.Sort(_comparer); Assert.IsTrue(_boCol[0].IntProp < _boCol[1].IntProp); }
public void TestString() { _comparer = new ReflectedPropertyComparer <MultiPropBO>("StringProp"); _boCol[0].StringProp = "b"; _boCol[1].StringProp = "a"; _boCol.Sort(_comparer); Assert.IsTrue(string.Compare(_boCol[0].StringProp, _boCol[1].StringProp) < 0); }
public void TestDateTime() { _comparer = new ReflectedPropertyComparer <MultiPropBO>("DateTimeProp"); _boCol[0].DateTimeProp = new DateTime?(new DateTime(2006, 1, 2)); _boCol[1].DateTimeProp = new DateTime?(new DateTime(2005, 1, 2)); _boCol.Sort(_comparer); Assert.IsTrue(_boCol[0].DateTimeProp < _boCol[1].DateTimeProp); }
public void TestDouble() { _comparer = new ReflectedPropertyComparer <MultiPropBO>("DoubleProp"); _boCol[0].DoubleProp = 2.1; _boCol[1].DoubleProp = 2.0; _boCol.Sort(_comparer); Assert.IsTrue(_boCol[0].DoubleProp < _boCol[1].DoubleProp); }
public void TestInt() { _comparer = new ReflectedPropertyComparer<MultiPropBO>("IntProp"); _boCol[0].IntProp = 2; _boCol[1].IntProp = 1; _boCol.Sort(_comparer); Assert.IsTrue(_boCol[0].IntProp < _boCol[1].IntProp); }
public void TestString() { _comparer = new ReflectedPropertyComparer<MultiPropBO>("StringProp"); _boCol[0].StringProp = "b"; _boCol[1].StringProp = "a"; _boCol.Sort(_comparer); Assert.IsTrue(string.Compare(_boCol[0].StringProp, _boCol[1].StringProp) < 0); }
public void TestDateTime() { _comparer = new ReflectedPropertyComparer<MultiPropBO>("DateTimeProp"); _boCol[0].DateTimeProp = new DateTime?(new DateTime(2006, 1, 2)); _boCol[1].DateTimeProp = new DateTime?(new DateTime(2005, 1, 2)); _boCol.Sort(_comparer); Assert.IsTrue(_boCol[0].DateTimeProp < _boCol[1].DateTimeProp); }
public void TestDouble() { _comparer = new ReflectedPropertyComparer<MultiPropBO>("DoubleProp"); _boCol[0].DoubleProp = 2.1; _boCol[1].DoubleProp = 2.0; _boCol.Sort(_comparer); Assert.IsTrue(_boCol[0].DoubleProp < _boCol[1].DoubleProp); }