public void calculateValuePermutationTest() { int n = 3; int k = 0; int result = AbsolutePermutation.calculateValuePermutation(n, k); Assert.AreEqual(4, result); }
public void divisonValueForPositionTest() { int n = 1; int k = 2; int result = AbsolutePermutation.divisonValueForPosition(n, k); Assert.AreEqual(2, result); }
public void checkDivisionPositinforElementTrueTest() { int n = 2; int k = 1; Boolean result = AbsolutePermutation.checkDivisionPositinAndElement(n, k); Assert.AreEqual(true, result); }
public void absolutePermutationTestCase1Step3() { int n = 3; int k = 2; int[] result = AbsolutePermutation.absolutePermutation(n, k); Assert.AreEqual(-1, result[0]); }
public void checkInputValuesFalseTest() { int n = 5; int k = 2; Boolean result = AbsolutePermutation.checkInputValues(n, k); Assert.AreEqual(false, result); }
public void checkInputValuesTrueFor0Test() { int n = 1; int k = 0; Boolean result = AbsolutePermutation.checkInputValues(n, k); Assert.AreEqual(true, result); }
public void checkDivisionPositinAndElementFalseTest() { int n = 7; int k = 3; Boolean result = AbsolutePermutation.checkDivisionPositinAndElement(n, k); Assert.AreEqual(false, result); }
public void absolutePermutationTestCase1Step1() { int n = 2; int k = 1; int[] result = AbsolutePermutation.absolutePermutation(n, k); Assert.AreEqual(2, result[0]); Assert.AreEqual(1, result[1]); }
public void MainFlow(string inputString, string expectedString) { var input = new StringReader(inputString); var expected = new StringReader(expectedString); int t = Convert.ToInt32(input.ReadLine()); for (int tItr = 0; tItr < t; tItr++) { string[] nk = input.ReadLine().Split(' '); int n = Convert.ToInt32(nk[0]); int k = Convert.ToInt32(nk[1]); int[] result = AbsolutePermutation.absolutePermutation(n, k); var finalResult = string.Join(" ", result); var fExpected = expected.ReadLine(); Assert.AreEqual(fExpected, finalResult); } }