public void TestShortVariableNullValue() { ShortVariable var = new ShortVariable(); bool actual = var.CheckForStore(null); Assert.IsFalse(actual); }
public void TestShortValue() { ShortVariable var = new ShortVariable(); short val = 123; var.CheckForStore(val); Assert.AreEqual(val, var.Value); }
public void TestGetShortType() { ShortVariable var = new ShortVariable(); Assert.AreEqual("short", var.StoreType); }
public void TestStringShortValue() { ShortVariable var = new ShortVariable(); Assert.IsTrue(var.CheckForStore("123")); }
public void TestNotShortValue() { ShortVariable var = new ShortVariable(); Assert.IsFalse(var.CheckForStore("string")); }
public void TestOverflowShortValue() { ShortVariable var = new ShortVariable(); Assert.IsFalse(var.CheckForStore(9223372036854775808)); }
internal static short?Convert(this ShortVariable variable) => variable?.Value;