Esempio n. 1
0
 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"));
 }
Esempio n. 2
0
 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"));
 }
Esempio n. 3
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"));
 }