public void StringComparisonNoMatch () { var stringAttribute = new SimpleDbAttributeValue ("hello", "world").Every(); Assert.IsFalse (stringAttribute == "hello"); Assert.IsFalse (stringAttribute == "world"); Assert.IsFalse (stringAttribute == "foo"); }
internal SessionSimpleDbAttribute(SessionSimpleDbItem item, string name, params string[] values) { _item = item; _name = name; _originalValue = new SimpleDbAttributeValue(values); _newValue = _originalValue; }
public void DateTimeComparison () { var dateTimeAttribute = new SimpleDbAttributeValue ("5/1/2008 8:30:52AM", "5/2/2008 8:30:52AM"); Assert.IsTrue (dateTimeAttribute == new DateTime(2008, 5, 1, 8, 30, 52)); Assert.IsTrue (dateTimeAttribute == new DateTime(2008, 5, 2, 8, 30, 52)); Assert.IsTrue (dateTimeAttribute < new DateTime(2008, 5, 2, 8, 30, 52)); Assert.IsTrue (dateTimeAttribute > new DateTime(2008, 5, 1, 8, 30, 52)); Assert.IsFalse (dateTimeAttribute == new DateTime(2008, 5, 3, 8, 30, 52)); }
public void IntComparison () { var intAttribute = new SimpleDbAttributeValue ("1", "2"); Assert.IsTrue (intAttribute == 1); Assert.IsTrue (intAttribute == 2); Assert.IsTrue (intAttribute < 2); Assert.IsTrue (intAttribute > 1); Assert.IsFalse (intAttribute == 3); }
public void LongComparisonNoMatch () { var longAttribute = new SimpleDbAttributeValue ("4294967296", "4294967297").Every(); Assert.IsFalse (longAttribute == 4294967296L); Assert.IsFalse (longAttribute == 4294967297L); Assert.IsFalse (longAttribute < 4294967297L); Assert.IsFalse (longAttribute > 4294967296L); Assert.IsFalse (longAttribute == 4294967298L); }
public void FloatComparisonNoMatch () { var floatAttribute = new SimpleDbAttributeValue ("3.5", "4.5").Every(); Assert.IsFalse (floatAttribute == 3.5F); Assert.IsFalse (floatAttribute == 4.5F); Assert.IsFalse (floatAttribute < 4.5F); Assert.IsFalse (floatAttribute > 3.5F); Assert.IsFalse (floatAttribute == 5.5F); }
public void IntComparisonNoMatch () { var intAttribute = new SimpleDbAttributeValue ("1", "2").Every(); Assert.IsFalse (intAttribute == 1); Assert.IsFalse (intAttribute == 2); Assert.IsFalse (intAttribute < 2); Assert.IsFalse (intAttribute > 1); Assert.IsFalse (intAttribute == 3); }
public void DoubleComparisonNoMatch () { var doubleAttribute = new SimpleDbAttributeValue ("4294967296.5", "4294967297.5").Every(); Assert.IsFalse (doubleAttribute == 4294967296.5D); Assert.IsFalse (doubleAttribute == 4294967297.5D); Assert.IsFalse (doubleAttribute < 4294967297.5D); Assert.IsFalse (doubleAttribute > 4294967296.5D); Assert.IsFalse (doubleAttribute == 4294967298.5D); }
public void DecimalComparison () { var decimalAttribute = new SimpleDbAttributeValue ("300.5", "301.5"); Assert.IsTrue (decimalAttribute == 300.5m); Assert.IsTrue (decimalAttribute == 301.5m); Assert.IsTrue (decimalAttribute < 301.5m); Assert.IsTrue (decimalAttribute > 300.5m); Assert.IsFalse (decimalAttribute == 302.5m); }
public void Add(string attributeName, SimpleDbAttributeValue value) { if (string.IsNullOrEmpty(attributeName)) { throw new ArgumentNullException("attributeName"); } if (value == null) { throw new ArgumentNullException("value"); } var attribute = new SessionSimpleDbAttribute(_item, attributeName); attribute.Value = value; if (_attributes.ContainsKey(attributeName)) { _attributes.Remove(attributeName); } _attributes.Add(attributeName, attribute); }
public void BooleanConversion () { var stringAttribute = new SimpleDbAttributeValue ("True"); Assert.IsTrue (stringAttribute == true); }
public void FloatComparisonYesMatch () { var floatAttribute = new SimpleDbAttributeValue ("3.5", "4.5").Every(); Assert.IsTrue (floatAttribute <= 4.5F); Assert.IsTrue (floatAttribute >= 3.5F); }
public void FailedIntConverstion () { var intAttribute = new SimpleDbAttributeValue ("test value"); Assert.IsFalse (intAttribute == 1); }
public void LongComparisonYesMatch () { var longAttribute = new SimpleDbAttributeValue ("4294967296", "4294967297").Every(); Assert.IsTrue (longAttribute <= 4294967297L); Assert.IsTrue (longAttribute >= 4294967296L); }
public void LongConversion () { var longAttribute = new SimpleDbAttributeValue ("4294967296"); Assert.IsTrue (longAttribute == 4294967296L); }
public void IntComparisonYesMatch () { var intAttribute = new SimpleDbAttributeValue ("1", "2").Every(); Assert.IsTrue (intAttribute <= 2); Assert.IsTrue (intAttribute >= 1); }
public void FailedLongConversion () { var longAttribute = new SimpleDbAttributeValue ("test value"); Assert.IsFalse (longAttribute == 4294967296L); }
public void IntConverstion () { var intAttribute = new SimpleDbAttributeValue ("1"); Assert.IsTrue (intAttribute == 1); }
public void FloatConversion () { var floatAttribute = new SimpleDbAttributeValue ("3.5"); Assert.IsTrue (floatAttribute == 3.5F); }
public void DoubleComparisonYesMatch () { var doubleAttribute = new SimpleDbAttributeValue ("4294967296.5", "4294967297.5").Every(); Assert.IsTrue (doubleAttribute <= 4294967297.5D); Assert.IsTrue (doubleAttribute >= 4294967296.5D); }
public void DeleteWhen(string attributeName, SimpleDbAttributeValue expectedValue) { throw new NotImplementedException(); }
public void FailedDecimalConversion () { var decimalAttribute = new SimpleDbAttributeValue ("test value"); Assert.IsFalse (decimalAttribute == 300.5m); }
public void DecimalConversion () { var decimalAttribute = new SimpleDbAttributeValue ("300.5"); Assert.IsTrue (decimalAttribute == 300.5m); }
public void FailedDoubleConversion () { var doubleAttribute = new SimpleDbAttributeValue ("test value"); Assert.IsFalse (doubleAttribute == 4294967296.5D); }
public void DoubleConversion () { var doubleAttribute = new SimpleDbAttributeValue ("4294967296.5"); Assert.IsTrue (doubleAttribute == 4294967296.5D); }
public void FailedFloatConversion () { var floatAttribute = new SimpleDbAttributeValue ("test value"); Assert.IsFalse (floatAttribute == 3.5F); }
public void DateTimeComparisonYesMatch () { var dateTimeAttribute = new SimpleDbAttributeValue ("5/1/2008 8:30:52AM", "5/2/2008 8:30:52AM").Every(); Assert.IsTrue (dateTimeAttribute <= new DateTime(2008, 5, 2, 8, 30, 52)); Assert.IsTrue (dateTimeAttribute >= new DateTime(2008, 5, 1, 8, 30, 52)); }
public void StringComparisonYesMatch () { var stringAttribute = new SimpleDbAttributeValue ("hello", "hello").Every(); Assert.IsTrue (stringAttribute == "hello"); }
public void DecimalComparisonYesMatch () { var decimalAttribute = new SimpleDbAttributeValue ("300.5", "301.5").Every(); Assert.IsTrue (decimalAttribute <= 301.5m); Assert.IsTrue (decimalAttribute >= 300.5m); }
public void FailedBooleanConversion () { var stringAttribute = new SimpleDbAttributeValue ("test value"); Assert.IsFalse (stringAttribute == true); }