public void ArrayLength1_ExpectTrue() { //Arrange SameFirstLast exercises = new SameFirstLast(); //Assert Assert.AreEqual(true, exercises.IsItTheSame(new int[] { 1 })); }
public void IsItTheSame() { SameFirstLast mySameFirstLast = new SameFirstLast(); Assert.AreEqual(false, mySameFirstLast.IsItTheSame(new int[] { 1, 2, 3 })); Assert.AreEqual(true, mySameFirstLast.IsItTheSame(new int[] { 1, 2, 3, 1 })); Assert.AreEqual(true, mySameFirstLast.IsItTheSame(new int[] { 1, 2, 1 })); }
public void firstLastTest() { SameFirstLast firstLastTest = new SameFirstLast(); Assert.AreEqual(true, firstLastTest.IsItTheSame(new int[] { 4, 8, 4 })); Assert.AreEqual(true, firstLastTest.IsItTheSame(new int[] { 1, 2, 3, 4, 1 })); Assert.AreEqual(false, firstLastTest.IsItTheSame(new int[] { 1, 2, 3, 4 })); }
public void SameFirstLast() { SameFirstLast testFirstLast = new SameFirstLast(); Assert.AreEqual(false, testFirstLast.IsItTheSame(new int[] { 1, 2, 3 }), "Test 1: Input was [1, 2, 3]"); Assert.AreEqual(true, testFirstLast.IsItTheSame(new int[] { 1, 2, 3, 1 }), "Test 2: Input was [1, 2, 3, 1]"); Assert.AreEqual(true, testFirstLast.IsItTheSame(new int[] { 1, 2, 1 }), "Test 3: Input was [1, 2, 1]"); }
public void ArrayLength0_ExpectFalse() { //Arrange SameFirstLast exercises = new SameFirstLast(); //Assert Assert.AreEqual(false, exercises.IsItTheSame(new int[] { })); }
public void IsItTheSame(int[] nums, bool expected) { SameFirstLast ex = new SameFirstLast(); bool actualResult = ex.IsItTheSame(nums); Assert.AreEqual(expected, actualResult); }
public void SameFirstLastTest() { SameFirstLast newStr = new SameFirstLast(); Assert.AreEqual(true, newStr.IsItTheSame(new int[] { 1, 2, 3, 1 })); Assert.AreEqual(false, newStr.IsItTheSame(new int[] { 2, 4, 3, 1 })); Assert.AreEqual(true, newStr.IsItTheSame(new int[] { 5, 3, 2, 5 })); }
public void TestSameFirstLastGivenNulls() { SameFirstLast empty = new SameFirstLast(); int[] emptyArray = null; Assert.IsFalse(empty.IsItTheSame(emptyArray)); }
public void TwoPlusFrontAndBack() { SameFirstLast exercises = new SameFirstLast(); Assert.AreEqual(true, exercises.IsItTheSame(new int[] { 1, 1 })); Assert.AreEqual(false, exercises.IsItTheSame(new int[] { 1, 3 })); Assert.AreEqual(false, exercises.IsItTheSame(new int[] { 1, 3, 3 })); Assert.AreEqual(true, exercises.IsItTheSame(new int[] { 1, 3, 1 })); }
public void IsItTheSame_1231_True() { SameFirstLast sameFirstLast = new SameFirstLast(); int[] input = { 1, 2, 3, 1 }; bool result = sameFirstLast.IsItTheSame(input); Assert.AreEqual(true, result); }
public void ItIsTheSameTestTrue121() { SameFirstLast sameFirstLast = new SameFirstLast(); int[] parameter = { 1, 2, 1 }; bool value = sameFirstLast.IsItTheSame(parameter); Assert.AreEqual(true, value); }
public void ItIsTheSameTest() { SameFirstLast sameFirstLast = new SameFirstLast(); int[] input = { 1, 2, 3 }; bool result = sameFirstLast.IsItTheSame(input); Assert.AreEqual(false, input); }
public void SameFirstLastTest3() { int[] input = { 1, 2, 1 }; SameFirstLast sameFirstLast = new SameFirstLast(); bool actual = sameFirstLast.IsItTheSame(input); Assert.AreEqual(true, actual); }
public void IsItTheSameTestYes() { SameFirstLast myArray = new SameFirstLast(); int[] array = new int[] { 3, 2, 3 }; bool myResult = myArray.IsItTheSame(array); Assert.AreEqual(true, myResult); }
public void SameFirstLastTests() { SameFirstLast sameFirstLastTest = new SameFirstLast(); Assert.AreEqual(false, sameFirstLastTest.IsItTheSame(new int[] { 1, 2, 3 })); Assert.AreEqual(true, sameFirstLastTest.IsItTheSame(new int[] { 1, 2, 3, 1 })); Assert.AreEqual(true, sameFirstLastTest.IsItTheSame(new int[] { 1, 2, 1 })); Assert.AreEqual(false, sameFirstLastTest.IsItTheSame(new int[] { 1, 2 })); Assert.AreEqual(true, sameFirstLastTest.IsItTheSame(new int[] { 1, 1 })); }
public void IsItTheSame() { int[] miaw = { 1, 2, 3 }; int[] miaw2 = { 1, 2, 3, 1 }; int[] miaw3 = { 1, 2, 1 }; SameFirstLast lae = new SameFirstLast(); Assert.IsFalse(lae.IsItTheSame(miaw)); Assert.IsTrue(lae.IsItTheSame(miaw2)); Assert.IsTrue(lae.IsItTheSame(miaw3)); }
public void IsItTheSame() { // Arrange SameFirstLast ex = new SameFirstLast(); // Act bool actualResult = ex.IsItTheSame(new int[] { 1, 2, 3 }); // Assert Assert.AreEqual(false, actualResult); }
public void DataTestSameFirstLast(int[] input1, bool expectedResult) { // Arrange SameFirstLast ex = new SameFirstLast(); // Act bool actualResult = ex.IsItTheSame(input1); //Assert Assert.AreEqual(expectedResult, actualResult); }
public void GetHerdTest() { var exercise = new SameFirstLast(); //IsItTheSame([1, 2, 3]) → false Assert.AreEqual(false, exercise.IsItTheSame(new int[] { 1, 2, 3 })); //IsItTheSame([1, 2, 3, 1]) → true Assert.AreEqual(true, exercise.IsItTheSame(new int[] { 1, 2, 3, 1 })); //IsItTheSame([1, 2, 1]) → true Assert.AreEqual(true, exercise.IsItTheSame(new int[] { 1, 2, 1 })); }
public void ArrayLength2OrMore() { //Arrange SameFirstLast exercises = new SameFirstLast(); //Assert Assert.AreEqual(true, exercises.IsItTheSame(new int[] { 1, 1 })); Assert.AreEqual(true, exercises.IsItTheSame(new int[] { 1, 3, 1 })); Assert.AreEqual(false, exercises.IsItTheSame(new int[] { 1, 3 })); Assert.AreEqual(false, exercises.IsItTheSame(new int[] { 1, 3, 3 })); }
public void TestSameFirstLastHappyPath() { SameFirstLast happyPath = new SameFirstLast(); List <int[]> numArrays = new List <int[]> { new int[] { 1, 2, 3, 1 }, new int[] { 2, 3, 1, 2 } }; Assert.IsTrue(happyPath.IsItTheSame(numArrays[0])); Assert.IsTrue(happyPath.IsItTheSame(numArrays[1])); }
public void theSameTests() { //Arrange SameFirstLast testIsItTheSame = new SameFirstLast(); //Act //Assert Assert.AreEqual(true, testIsItTheSame.IsItTheSame(new int[] { 1, 2, 3, 1 })); Assert.AreEqual(true, testIsItTheSame.IsItTheSame(new int[] { 1, 2, 1 })); }
public void AreFirstAndLastIndexEqualLength1() { //Arrange SameFirstLast intArray = new SameFirstLast(); int[] numbers = { 3 }; //Act bool result = intArray.IsItTheSame(numbers); //Assert Assert.AreEqual(false, result); }
public void False_If_First_And_Last_Are_Different() { //Arrange SameFirstLast testMethod = new SameFirstLast(); int[] testArray = new int[] { 1, 1, 3, 5, 511, 99 }; bool expectedResult = false; //Act bool actualResult = testMethod.IsItTheSame(testArray); //Assert Assert.AreEqual(expectedResult, actualResult); }
public void ShouldReturnTrueWithLengthOfOne() { //arrange SameFirstLast newSameFirstLast = new SameFirstLast(); int[] numbers = { 13 }; //act bool oneOrMoreAndTheSame = newSameFirstLast.IsItTheSame(numbers); //assert Assert.AreEqual(true, oneOrMoreAndTheSame); }
public void ShouldReturnFalseWithLengthUnderOne() { //arrange SameFirstLast newSameFirstLast = new SameFirstLast(); int[] numbers = { }; //act bool oneOrMoreAndTheSame = newSameFirstLast.IsItTheSame(numbers); //assert Assert.AreEqual(false, oneOrMoreAndTheSame); }
public void IsItTheSameVariables() { int[] miaw = { 0, 1, 0 }; int[] miaw2 = { -5, 0, -89, -5 }; int[] miaw3 = {1}; int[] miaw4 = { }; SameFirstLast lae = new SameFirstLast(); Assert.IsTrue(lae.IsItTheSame(miaw)); Assert.IsTrue(lae.IsItTheSame(miaw2)); Assert.IsTrue(lae.IsItTheSame(miaw3)); Assert.IsFalse(lae.IsItTheSame(miaw4)); }
public void notTheSameTests() { //Arrange SameFirstLast testIsItTheSame = new SameFirstLast(); SameFirstLast testIsIt2TheSame = new SameFirstLast(); SameFirstLast testIsIt3TheSame = new SameFirstLast(); //Act bool testIsNotSame = testIsItTheSame.IsItTheSame(new int[] { 32, 13, 30 }); bool testIsNotSame2 = testIsIt2TheSame.IsItTheSame(new int[] { 1, 2, 3 }); bool testIsNotSame3 = testIsIt3TheSame.IsItTheSame(new int[] { 1, 2, 3, 1, 5 }); //Assert Assert.AreEqual(false, testIsNotSame); Assert.AreEqual(false, testIsNotSame2); Assert.AreEqual(false, testIsNotSame3); }
public void SameFirstLast() { SameFirstLast _exercises = new SameFirstLast(); int[] a = new int[] { 1, 2, 3 }; bool result = _exercises.IsItTheSame(a); Assert.AreEqual(false, result, "Input: int[] a = {1, 2, 3})"); int[] b = new int[] { 1, 2, 3, 1 }; result = _exercises.IsItTheSame(b); Assert.AreEqual(true, result, "Input: int[] b = {1, 2, 3, 1})"); int[] c = new int[] { 1, 2, 1 }; result = _exercises.IsItTheSame(c); Assert.AreEqual(true, result, "Input: int[] c = {1, 2, 1})"); }
public void ArrayLength() { SameFirstLast arrayLength = new SameFirstLast(); bool result = arrayLength.IsItTheSame(new int[] { 1, 2, 3 }); Assert.AreEqual(false, result); SameFirstLast arrayLengthEqual = new SameFirstLast(); bool result2 = arrayLength.IsItTheSame(new int[] { 1, 2, 3, 1 }); Assert.AreEqual(true, result2); SameFirstLast arrayLengthEqualShort = new SameFirstLast(); bool result3 = arrayLength.IsItTheSame(new int[] { 1, 2, 1 }); Assert.AreEqual(true, result3); }