public void getValue_returnEmptyString_ForNonexistingItem() { DbStringBuilder builder = new DbStringBuilder(); string key = "a"; string actual = builder.getValue(key); Assert.IsNull(actual); }
public void afterAddingElementByKeyAndDatetimeValue_DictionaryHasThisElement() { DbStringBuilder builder = new DbStringBuilder(); string key = "key"; DateTime added = new DateTime(2017, 4, 21); string expected = "'2017-04-21 00:00:00'"; builder.Add(key, added); string value = builder.getValue(key); Assert.AreEqual(expected, value); }
public void afterAddingElementByKeyAndBooleanValue_DictionaryHasThisElement() { DbStringBuilder builder = new DbStringBuilder(); string key = "key"; bool added = true; string expected = "1"; builder.Add(key, added); string value = builder.getValue(key); Assert.AreEqual(expected, value); }
public void afterAddingElementByKeyAndDoubleValue_DictionaryHasThisElement() { DbStringBuilder builder = new DbStringBuilder(); string key = "key"; double added = 1.23456789; string expected = "1.23457"; builder.Add(key, added); string value = builder.getValue(key); Assert.AreEqual(expected, value); }
public void afterAddingElementByKeyAndExpression_DictionaryHasThisElement() { DbStringBuilder builder = new DbStringBuilder(); string key = "key"; string expression = "NOW()"; string expected = "NOW()"; builder.AddExpression(key, expression); string value = builder.getValue(key); Assert.AreEqual(expected, value); }
public void getValue_returnProperValue_ForExistingItem() { DbStringBuilder builder = new DbStringBuilder(); string key = "a"; int value = 1; string expected = "1"; builder.Add(key, value); string actual = builder.getValue(key); Assert.AreEqual(expected, actual); }