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); }
public void TestBinToIntConvrter_ConvertFails() { var c = new BinToIntConvertService(); Assert.Throws <FormatException>(() => c.ToByte("invalid bin")); }