public void EndLengthLargest() { MaxEnd3 output = new MaxEnd3(); CollectionAssert.AreEqual(new int[] { 7, 7, 7 }, output.MakeArray(new int[] { 4, 19, 7 })); CollectionAssert.AreEqual(new int[] { 8, 8, 8 }, output.MakeArray(new int[] { 5, 2, 8 })); }
public void SameStartAndEnd() { MaxEnd3 output = new MaxEnd3(); //arrange CollectionAssert.AreEqual(new int[] { 5, 5, 5 }, output.MakeArray(new int[] { 5, 15, 5 })); //assert/act CollectionAssert.AreEqual(new int[] { 9, 9, 9 }, output.MakeArray(new int[] { 9, 1, 9 })); }
public void StartLengthLargets() { MaxEnd3 output = new MaxEnd3(); CollectionAssert.AreEqual(new int[] { 9, 9, 9 }, output.MakeArray(new int[] { 9, 7, 6 })); CollectionAssert.AreEqual(new int[] { 11, 11, 11 }, output.MakeArray(new int[] { 11, 13, 1 })); }
public void MaxEnd3() { MaxEnd3 testMaxEnd3 = new MaxEnd3(); CollectionAssert.AreEqual(new int[] { 3, 3, 3 }, testMaxEnd3.MakeArray(new int[] { 1, 2, 3 }), "Test 1: Input was [1, 2, 3]"); CollectionAssert.AreEqual(new int[] { 11, 11, 11 }, testMaxEnd3.MakeArray(new int[] { 11, 5, 9 }), "Test 2: Input was [11, 5, 9]"); CollectionAssert.AreEqual(new int[] { 3, 3, 3 }, testMaxEnd3.MakeArray(new int[] { 2, 11, 3 }), "Test 3: Input was [2, 11, 3]"); }
public void MakeArray(int[] nums, int[] expected) { MaxEnd3 ex = new MaxEnd3(); int[] actualResult = ex.MakeArray(nums); CollectionAssert.AreEqual(expected, actualResult); }
public void MaxEnd3Test() { MaxEnd3 newMax = new MaxEnd3(); CollectionAssert.AreEqual(new int[] { 3, 3, 3, 3 }, newMax.MakeArray(new int[] { 0, 2, 2, 3 })); CollectionAssert.AreEqual(new int[] { 5, 5 }, newMax.MakeArray(new int[] { 2, 5 })); CollectionAssert.AreEqual(new int[] { 10, 10, 10, 10, 10 }, newMax.MakeArray(new int[] { 8, 3, 2, 4, 10 })); }
public void MaxEndTest() { MaxEnd3 myMax = new MaxEnd3(); CollectionAssert.AreEquivalent(new int[] { 3, 3, 3 }, myMax.MakeArray(new int[] { 1, 2, 3 })); CollectionAssert.AreEquivalent(new int[] { 21, 21, 21 }, myMax.MakeArray(new int[] { 21, 4, 6 })); CollectionAssert.AreEquivalent(new int[] { 6, 6, 6 }, myMax.MakeArray(new int[] { 6, 4, 2 })); }
public void TesthMaxEnd3GivenNull() { MaxEnd3 happyPath = new MaxEnd3(); int[] listOfNums = null; Assert.AreEqual(null, happyPath.MakeArray(listOfNums)); }
public void MakeArrayTest() { MaxEnd3 myMaxEnd3 = new MaxEnd3(); CollectionAssert.AreEqual(new int[] { 3, 3, 3 }, myMaxEnd3.MakeArray(new int[] { 1, 2, 3 })); CollectionAssert.AreEqual(new int[] { 11, 11, 11 }, myMaxEnd3.MakeArray(new int[] { 11, 5, 9 })); CollectionAssert.AreEqual(new int[] { 3, 3, 3 }, myMaxEnd3.MakeArray(new int[] { 2, 11, 3 })); }
public void MaxEnd3GoodTest() { MaxEnd3 myArray = new MaxEnd3(); int[] expectedResult = new int[] { 3, 3, 3 }; int[] array = new int[] { 1, 2, 3 }; int[] match = myArray.MakeArray(array); CollectionAssert.AreEquivalent(expectedResult, match); }
public void MakeArrayTest2113() { MaxEnd3 maxEnd3 = new MaxEnd3(); int[] first = { 2, 11, 3, }; int[] expected = { 3, 3, 3 }; int[] result = maxEnd3.MakeArray(first); CollectionAssert.AreEqual(expected, result); }
public void MakeArrayTest1159() { MaxEnd3 maxEnd3 = new MaxEnd3(); int[] first = { 11, 5, 9, }; int[] expected = { 11, 11, 11 }; int[] result = maxEnd3.MakeArray(first); CollectionAssert.AreEqual(expected, result); }
public void EndSameSizesTest() { //Arrange MaxEnd3 exercises = new MaxEnd3(); //Assert CollectionAssert.AreEqual(new int[] { 10, 10, 10 }, exercises.MakeArray(new int[] { 10, 0, 10 })); CollectionAssert.AreEqual(new int[] { 10, 10, 10 }, exercises.MakeArray(new int[] { 10, 20, 10 })); }
public void EndLargerTest() { //Arrange MaxEnd3 exercises = new MaxEnd3(); //Assert CollectionAssert.AreEqual(new int[] { 3, 3, 3 }, exercises.MakeArray(new int[] { 1, 0, 3 })); CollectionAssert.AreEqual(new int[] { 3, 3, 3 }, exercises.MakeArray(new int[] { 1, 10, 3 })); }
public void BeginningLargerTest() { //Arrange MaxEnd3 exercises = new MaxEnd3(); //Assert CollectionAssert.AreEqual(new int[] { 13, 13, 13 }, exercises.MakeArray(new int[] { 13, 0, 3 })); CollectionAssert.AreEqual(new int[] { 13, 13, 13 }, exercises.MakeArray(new int[] { 13, 20, 3 })); }
public void MakeArray_123_333() { MaxEnd3 maxEnd3 = new MaxEnd3(); int[] input = { 1, 2, 3 }; int[] result = maxEnd3.MakeArray(input); int[] expected = { 3, 3, 3 }; CollectionAssert.AreEqual(expected, result); }
public void MaxEndTest3() { int[] input = { 2, 11, 3 }; MaxEnd3 maxEnd3 = new MaxEnd3(); int[] actual = maxEnd3.MakeArray(input); int[] expected = { 3, 3, 3 }; Assert.AreEqual(true, actual.SequenceEqual(expected)); }
public void MakeArrayTest() { var exercise = new MaxEnd3(); //MakeArray([1, 2, 3]) → [3, 3, 3] CollectionAssert.AreEqual(new int[] { 3, 3, 3 }, exercise.MakeArray(new int[] { 1, 2, 3 })); //MakeArray([11, 5, 9]) → [11, 11, 11] CollectionAssert.AreEqual(new int[] { 11, 11, 11 }, exercise.MakeArray(new int[] { 11, 5, 9 })); //MakeArray([2, 11, 3]) → [3, 3, 3] CollectionAssert.AreEqual(new int[] { 3, 3, 3 }, exercise.MakeArray(new int[] { 2, 11, 3 })); }
public void DataTestMakeArray(int[] input1, int[] expectedResult) { // Arrange MaxEnd3 ex = new MaxEnd3(); // Act int[] actualResult = ex.MakeArray(input1); //Assert CollectionAssert.AreEqual(expectedResult, actualResult); }
public void MakeArray() { // Arrange MaxEnd3 ex = new MaxEnd3(); // Act int[] actualResult = ex.MakeArray(new int[] { 1, 2, 3 }); // Assert CollectionAssert.AreEqual(new int[] { 3, 3, 3 }, actualResult); }
public void DoesItReturnTriple5() { //Arrange MaxEnd3 max = new MaxEnd3(); int[] input = { 5, 2, 5 }; int[] expectation = { 5, 5, 5 }; //Act int[] result = max.MakeArray(input); //Assert CollectionAssert.AreEqual(expectation, result); }
public void MakeArray3Tests() { //Arrange MaxEnd3 max3Array = new MaxEnd3(); //Act int[] beginningLarger = max3Array.MakeArray(new int[] { 10, 0, 10 }); int[] beginning2Larger = max3Array.MakeArray(new int[] { 10, 20, 10 }); //Assert CollectionAssert.AreEqual(new int[] { 10, 10, 10 }, beginningLarger); CollectionAssert.AreEqual(new int[] { 10, 10, 10 }, beginning2Larger); }
//end is larger public void MakeArrayTests() { //Arrange MaxEnd3 maxarray = new MaxEnd3(); //Act int[] endLarger = maxarray.MakeArray(new int[] { 1, 0, 3 }); int[] end2Larger = maxarray.MakeArray(new int[] { 1, 10, 3 }); //Assert CollectionAssert.AreEqual(new int[] { 3, 3, 3 }, endLarger); CollectionAssert.AreEqual(new int[] { 3, 3, 3 }, end2Larger); }
public void ShouldSetAllValuesEqualToLastValue() { //arrange MaxEnd3 allSet = new MaxEnd3(); int[] numbers = { 19, 5, 1738 }; int[] correctNumbers = { 1738, 1738, 1738 }; //act int[] newNumbers = allSet.MakeArray(numbers); //assert Assert.ReferenceEquals(correctNumbers, newNumbers); }
public void Check_Last_Index_Make_New_Array_With_Bigger_Number() { //Arrange MaxEnd3 testMethod = new MaxEnd3(); int[] array1 = new int[] { 0, 5, 11 }; int[] expectedArray = new[] { 11, 11, 11 }; //Act int[] resultArray = testMethod.MakeArray(array1); //Assert CollectionAssert.AreEqual(expectedArray, resultArray); }
public void First_Index_And_Last_Index_Are_Same() { //Arrange MaxEnd3 testMethod = new MaxEnd3(); int[] array1 = new int[] { 0, 5, 0 }; int[] expectedArray = new[] { 0, 0, 0 }; //Act int[] resultArray = testMethod.MakeArray(array1); //Assert CollectionAssert.AreEqual(expectedArray, resultArray); }
public void MakeArrayVariables() { int[] miaw = { 1, 1000, 0 }; int[] miaw2 = { 10000, 5, -10001 }; int[] miaw3 = { 0, 0, 0 }; int[] answer = { 1, 1, 1 }; int[] answer2 = { 10000, 10000, 10000 }; int[] answer3 = { 0, 0, 0 }; MaxEnd3 lae = new MaxEnd3(); CollectionAssert.AreEqual(answer, lae.MakeArray(miaw)); CollectionAssert.AreEqual(answer2, lae.MakeArray(miaw2)); CollectionAssert.AreEqual(answer3, lae.MakeArray(miaw3)); }
public void MakeArray() { int[] miaw = { 1, 2, 3 }; int[] miaw2 = { 11, 5, 9 }; int[] miaw3 = { 2, 11, 3 }; int[] answer = { 3, 3, 3 }; int[] answer2 = { 11, 11, 11 }; int[] answer3 = { 3, 3, 3 }; MaxEnd3 lae = new MaxEnd3(); CollectionAssert.AreEqual(answer, lae.MakeArray(miaw)); CollectionAssert.AreEqual(answer2, lae.MakeArray(miaw2)); CollectionAssert.AreEqual(answer3, lae.MakeArray(miaw3)); }
public void TestHappyPathMaxEnd3() { MaxEnd3 happyPath = new MaxEnd3(); List <int[]> listOfNums = new List <int[]> { new int[] { 1, 2, 3 }, new int[] { 1, 1, 2 }, new int[] { 2, 6, 3 }, new int[] { 3, 3, 3 }, new int[] { 2, 2, 2 } }; CollectionAssert.AreEqual(listOfNums[3], happyPath.MakeArray(listOfNums[0])); CollectionAssert.AreEqual(listOfNums[4], happyPath.MakeArray(listOfNums[1])); CollectionAssert.AreEqual(listOfNums[3], happyPath.MakeArray(listOfNums[2])); }
public void RepeatValues() { MaxEnd3 repeats = new MaxEnd3(); int[] result = repeats.MakeArray(new int[] { 1, 2, 3 }); CollectionAssert.AreEqual(new int[] { 3, 3, 3 }, result); MaxEnd3 repeatsAgain = new MaxEnd3(); int[] result2 = repeatsAgain.MakeArray(new int[] { 11, 5, 9 }); CollectionAssert.AreEqual(new int[] { 11, 11, 11 }, result2); MaxEnd3 repeatsTres = new MaxEnd3(); int[] result3 = repeatsTres.MakeArray(new int[] { 2, 11, 3 }); CollectionAssert.AreEqual(new int[] { 3, 3, 3 }, result3); }