public void AsInt_returns_integer_in_string(int value) { var testString = $"{value}"; var result = HelperExtensions.AsInt(testString); Assert.That(result, Is.EqualTo(value)); }
public void AsInt_throws_if_invalid_string(string testString) { Assert.Throws <FormatException>(() => HelperExtensions.AsInt(testString)); }