public void TestSetGetString(string key, string value) { var sut = new CustomDataMap(); sut.SetString(key, value); Check.That(sut.GetString(key)).IsEqualTo(value); }
public void TestNullKeyNotAllowed() { var sut = new CustomDataMap(); Check.ThatCode(() => sut.SetString(null, default)).Throws <ArgumentNullException>(); Check.ThatCode(() => sut.SetBool(null, default)).Throws <ArgumentNullException>(); Check.ThatCode(() => sut.SetLong(null, default)).Throws <ArgumentNullException>(); Check.ThatCode(() => sut.SetULong(null, default)).Throws <ArgumentNullException>(); Check.ThatCode(() => sut.SetXElement(null, default)).Throws <ArgumentNullException>(); Check.ThatCode(() => sut.GetString(null)).Throws <ArgumentNullException>(); Check.ThatCode(() => sut.GetBool(null, default)).Throws <ArgumentNullException>(); Check.ThatCode(() => sut.GetLong(null, default)).Throws <ArgumentNullException>(); Check.ThatCode(() => sut.GetULong(null, default)).Throws <ArgumentNullException>(); Check.ThatCode(() => sut.GetXElement(null, default)).Throws <ArgumentNullException>(); }