public void ParseValueMustBeSupported() { var allSupported = Array.ConvertAll(DbaseCodePage.All, _ => _.ToByte()); var value = new Generator <byte>(_fixture) .First(candidate => !Array.Exists(allSupported, supported => supported == candidate)); Assert.Throws <ArgumentException>(() => DbaseCodePage.Parse(value)); }
public void ToStringReturnsExpectedValue() { var value = _fixture.Create <byte>().AsDbaseCodePageValue(); var sut = DbaseCodePage.Parse(value); var result = sut.ToString(); Assert.Equal(value.ToString(), result); }