Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        public void ToStringReturnsExpectedValue()
        {
            var value = _fixture.Create <byte>().AsDbaseCodePageValue();
            var sut   = DbaseCodePage.Parse(value);

            var result = sut.ToString();

            Assert.Equal(value.ToString(), result);
        }