public void FromString_NegativeInteger_ThrowsArgumentException() { Assert.Throws <ArgumentException>(() => GameVersion.FromString("-1.0.0")); Assert.Throws <ArgumentException>(() => GameVersion.FromString("1.-9.0")); Assert.Throws <ArgumentException>(() => GameVersion.FromString("1.9.-42")); }
public void FromString_IncorrectNumberOfSections_ThrowsArgumentException() { Assert.Throws <ArgumentException>(() => GameVersion.FromString("0")); Assert.Throws <ArgumentException>(() => GameVersion.FromString("0.0")); Assert.Throws <ArgumentException>(() => GameVersion.FromString("0.0.0.0")); }
public void FromString_Letters_ThrowsArgumentException() { Assert.Throws <ArgumentException>(() => GameVersion.FromString("a.1.2")); Assert.Throws <ArgumentException>(() => GameVersion.FromString("1.b.2")); Assert.Throws <ArgumentException>(() => GameVersion.FromString("1.2.c")); }