|
4 | 4 | public class BinaryTest |
5 | 5 | { |
6 | 6 | // change Ignore to false to run test case or just remove 'Ignore = true' |
7 | | - [TestCase("1", Result = 1)] |
8 | | - [TestCase("10", Result = 2, Ignore = true)] |
9 | | - [TestCase("11", Result = 3, Ignore = true)] |
10 | | - [TestCase("100", Result = 4, Ignore = true)] |
11 | | - [TestCase("1001", Result = 9, Ignore = true)] |
12 | | - [TestCase("11010", Result = 26, Ignore = true)] |
13 | | - [TestCase("10001101000", Result = 1128, Ignore = true)] |
| 7 | + [TestCase("1", ExpectedResult = 1)] |
| 8 | + [TestCase("10", ExpectedResult = 2, Ignore = "Remove to run test case")] |
| 9 | + [TestCase("11", ExpectedResult = 3, Ignore = "Remove to run test case")] |
| 10 | + [TestCase("100", ExpectedResult = 4, Ignore = "Remove to run test case")] |
| 11 | + [TestCase("1001", ExpectedResult = 9, Ignore = "Remove to run test case")] |
| 12 | + [TestCase("11010", ExpectedResult = 26, Ignore = "Remove to run test case")] |
| 13 | + [TestCase("10001101000", ExpectedResult = 1128, Ignore = "Remove to run test case")] |
14 | 14 | public int Binary_converts_to_decimal(string binary) |
15 | 15 | { |
16 | 16 | return Binary.ToDecimal(binary); |
17 | 17 | } |
18 | 18 |
|
19 | | - [TestCase("carrot", Ignore = true)] |
20 | | - [TestCase("2", Ignore = true)] |
21 | | - [TestCase("5", Ignore = true)] |
22 | | - [TestCase("9", Ignore = true)] |
23 | | - [TestCase("134678", Ignore = true)] |
24 | | - [TestCase("abc10z", Ignore = true)] |
| 19 | + [TestCase("carrot", Ignore = "Remove to run test case")] |
| 20 | + [TestCase("2", Ignore = "Remove to run test case")] |
| 21 | + [TestCase("5", Ignore = "Remove to run test case")] |
| 22 | + [TestCase("9", Ignore = "Remove to run test case")] |
| 23 | + [TestCase("134678", Ignore = "Remove to run test case")] |
| 24 | + [TestCase("abc10z", Ignore = "Remove to run test case")] |
25 | 25 | public void Invalid_binary_is_decimal_0(string invalidValue) |
26 | 26 | { |
27 | 27 | Assert.That(Binary.ToDecimal(invalidValue), Is.EqualTo(0)); |
28 | 28 | } |
29 | 29 |
|
30 | | - [Ignore] |
| 30 | + [Ignore("Remove to run test")] |
31 | 31 | [Test] |
32 | 32 | public void Binary_can_convert_formatted_strings() |
33 | 33 | { |
|
0 commit comments