public void Nested_Array_Null_Without_Split_Character() { // Arrange FlatArray flatArray = new FlatArray(); // Act flatArray.BuildTheFlatArray(null); // Assert Assert.AreEqual(0, flatArray.ConvertStringArrayToIntegerArray().Length); }
public void Nested_Array_Empty_With_Null_Split_Character() { // Arrange FlatArray flatArray = new FlatArray(); char empty = '\0'; // Act flatArray.BuildTheFlatArray("", empty); // Assert Assert.AreEqual(0, flatArray.ConvertStringArrayToIntegerArray().Length); }
public void Nested_Array_With_Expected_Output() { // Arrange FlatArray flatArray = new FlatArray(); int[] expectedArray = new int[] { 1, 2, 3, 4 }; // Act flatArray.BuildTheFlatArray("[[1, 2,[3]],4]", ','); // Assert CollectionAssert.AreEqual(expectedArray, flatArray.ConvertStringArrayToIntegerArray()); }