public void TestSetGetULong(string key, ulong value) { var sut = new CustomDataMap(); sut.SetULong(key, value); Check.That(sut.GetULong(key, 0)).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>(); }