public void Should_have_a_value_of_15_for_table_element_3_2() { var primeNumberList = new List<int> { 2, 3, 5 }; var tableBuilder = new PrimeMultiplicationTableBuilder(); var primeNumberTable = tableBuilder.BuildTable(primeNumberList); Assert.That(primeNumberTable[3, 2], Is.EqualTo("15")); }
public void Should_have_an_empty_string_for_table_element_0_0() { var primeNumberList = new List<int> { 2 }; var tableBuilder = new PrimeMultiplicationTableBuilder(); var primeNumberTable = tableBuilder.BuildTable(primeNumberList); Assert.That(primeNumberTable[0, 0], Is.EqualTo(string.Empty)); }
public void Should_build_an_empty_table_for_an_empty_list_of_primes() { var primeNumberList = new List<int>(); var tableBuilder = new PrimeMultiplicationTableBuilder(); var primeNumberTable = tableBuilder.BuildTable(primeNumberList); Assert.That(primeNumberTable.Length, Is.EqualTo(0)); }
public void Should_build_a_table_of_size_4_for_a_list_of_1_prime() { var primeNumberList = new List<int> { 2 }; var tableBuilder = new PrimeMultiplicationTableBuilder(); var primeNumberTable = tableBuilder.BuildTable(primeNumberList); const int arraySize = 4; // 2 * 2; Assert.That(primeNumberTable.Length, Is.EqualTo(arraySize)); }
public void Should_have_a_value_of_4_for_table_element_1_1() { var primeNumberList = new List<int> { 2 }; var tableBuilder = new PrimeMultiplicationTableBuilder(); var primeNumberTable = tableBuilder.BuildTable(primeNumberList); Assert.That(primeNumberTable[1, 1], Is.EqualTo("4")); }