public void TestSetGetBool(string key, bool value) { var sut = new CustomDataMap(); sut.SetBool(key, value); Check.That(sut.GetBool(key, !value)).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>(); }