public void Parse_NullS_ThrowsArgumentNullException() { var parser = new WallColorParser(); // ReSharper disable once AssignNullToNotNullAttribute Assert.That(() => parser.Parse(null), Throws.ArgumentNullException); }
public void Parse(string s, byte expectedColor) { var parser = new WallColorParser(); var tile = new Tile(); var wallColor = parser.Parse(s); Assert.That(wallColor, Is.Not.Null); tile = wallColor.Apply(tile); Assert.That(tile.WallColor, Is.EqualTo(expectedColor)); }
public void Parse_InvalidWallColor_ReturnsNull(string s) { var parser = new WallColorParser(); Assert.That(parser.Parse(s), Is.Null); }