示例#1
0
        public void TestBinToIntConvrter_ConvertsToByte(string input, byte expected)
        {
            var c = new BinToIntConvertService();
            var r = c.ToByte(input);

            Assert.IsType <byte>(r);
            Assert.Equal(expected, r);
        }
示例#2
0
        public void TestBinToIntConvrter_ConvertFails()
        {
            var c = new BinToIntConvertService();

            Assert.Throws <FormatException>(() => c.ToByte("invalid bin"));
        }