public void ExponentialTest(int x, int y, int n, double expected) { var exp = new Eng35Tests(); var actual = Eng35Tests.Exponential(x, y, n); Assert.AreEqual(expected, actual); }
public void Mega_Multiple_Coding_Loops_Tests(int[] array, int expected) { //arrange // act var actual = Eng35Tests.Mega_Multiple_Coding_Loops(array); // assert Assert.AreEqual(expected, actual); }
public void ArrayLoopQueueStack(int[] array, double expected) { // arrange // act var actual = Eng35Tests.Array_Loop_Queue_Stack(array); // assert Assert.AreEqual(expected, actual); }
static void Main(string[] args) { var myArray = Enumerable.Range(1, 20).ToArray(); List <string> fizz = Eng35Tests.Fizzbuzz(myArray); foreach (var str in fizz) { Console.WriteLine(str); } Console.WriteLine(Eng35Tests.Power(1, 2, 3)); }
static void Main(string[] args) { int[] r = new int[10] { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 }; var x = Enumerable.Range(1, 10).ToArray(); int[] y = new int[4] { 10, 20, 30, 40 }; Eng35Tests.CreateArrayFromSentence("Sam is Amazing"); Eng35Tests.CreateArrayFromSentence2("Sam is the best"); Eng35Tests.Calculate_Words_In_Sentence("Sam is Amazing"); Eng35Tests.Turn_First_Word_To_Uppercase("Sam is Amazing"); Eng35Tests.Mega_Multiple_Coding_Loop(r); Eng35Tests.SumOfArray(x); Eng35Tests.How_Many_Numbers_Divisible_By(2, 10, 4); Eng35Tests.Array_Loop_Queue_Stack(y); /*Write a short program that prints each number from 1 to 100 on a new line. * * For each multiple of 3, print "Fizz" instead of the number. * * For each multiple of 5, print "Buzz" instead of the number. * * * For numbers which are multiples of both 3 and 5, print "FizzBuzz" instead of the number*/ for (int i = 1; i <= 100; i++) { if (i % 3 == 0 && i % 5 == 0) { Console.WriteLine("FizzBuzz"); } else if (i % 3 == 0) { Console.WriteLine("Fizz"); } else if (i % 5 == 0) { Console.WriteLine("Buzz"); } else { Console.WriteLine(i); } } }
public void Mega_Multiple_Coding_Loops(int[] myarray, int expected) { var actual = Eng35Tests.Mega_Multiple_Coding_Loops(myarray); Assert.AreEqual(expected, actual); /*Pass in array of 10 numbers[10, 11, 15, 25..While loop ==> add one to each number[11, 12, 16 * * Do..While loop ==> add 3 to each number[14, 15, 19..Foreach loop ==> double each number[28, 30, 38... * Create a Cat class with string Name and int Age.Have a Constructor. * * Create a list of Cats and foreach loop => create new cat with name 'Cat'+number' and Age=number * eg first cat is called 'Cat28' and has Age 28. * print the list of cats with names and ages * Return the total of all the ages of all cats!*/ }
static void Main(string[] args) { // Eng35Tests.Create_Array_From_Sentence("This is a test"); // Eng35Tests.Calculate_Words_In_Sentence("This is another test"); // Eng35Tests.Turns_First_Word_To_Uppercase(); // Eng35Tests.Turns_All_Words_To_Uppercase_But_Last_Word_To_Lowercase(); int[] array = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; Eng35Tests.Mega_Multiple_Coding_Loops(array); /* for (int i = 1; i <= 100; i++) * { * if (i % 3 == 0) * { * Console.Write("Fizz"); * } * if (i % 5 == 0) * { * Console.Write("Buzz"); * } * }*/ }
static void Main(string[] args) { int[] ar = new int[] { 1, 2, 3, 5, 6, 7, 8, 9, 10, 11 }; int[] tr = new int[] { 10, 20, 30, 50, 60, 70, 80, 90, 100, 110 }; //return array int[] ra = new int[] { 1, 2, 3, 4, 5, 6 }; //xyz int[] xyz = new int[] { 94, 101, 20, 45, 57 }; var numArray = new int[] { 10, 20, 30, 40 }; var snaptest = new int[] { 5, 6, 7, 8, 9 }; int[] rabbits01 = new int[] { }; //Console.WriteLine("Hello World!"); //Console.WriteLine(Eng35Tests.CreateArrayFromSentence(" ")); Eng35Tests.Mega_Multiple_Coding_Loops(ar); Eng35Tests.Mega_Loops_TrialRun(tr); //xyz Eng35Tests.Accept_Xyz(xyz); //Console.WriteLine(Eng35Tests.Accept_Xyz(xyz)); Eng35Tests.Array_loop_queue_stack(numArray); //How_Many_Numbers_Divisible_by Eng35Tests.How_Many_Numbers_Divisible_by(2, 10, 4); Console.WriteLine(Eng35Tests.How_Many_Numbers_Divisible_by(2, 10, 4)); //return sum Console.WriteLine(Eng35Tests.Return_Sum_of_array(ra)); //method to accept x,y,n //snap test Eng35Tests.snapTest(snaptest); }
public void Mega_Multiple_Coding_Loops_Tests(int[] testArray, int expected) { var actual = Eng35Tests.Mega_Multiple_Coding_Loops2(testArray); Assert.AreEqual(expected, actual); }
public void Array_Sort(int[] arr, int[] expected) { var actual = Eng35Tests.Array_Sorting(arr); Assert.AreEqual(expected, actual); }
public void Return_Sum_of_array(int [] ReturnArray, int expected) { var actual = Eng35Tests.Return_Sum_of_array(ReturnArray); Assert.AreEqual(expected, actual); }
public void Sum_Of_Array(int[] myArray, int expected) { var actual = Eng35Tests.SumOfArray(myArray); Assert.AreEqual(expected, actual); }
public void Mega_Loops_TrialRun(int [] testingArray, int expected) { var actual = Eng35Tests.Mega_Loops_TrialRun(testingArray); Assert.AreEqual(expected, actual); }
//[TestCase(10000, 10)] public void RabbitExplosionTest(int seconds, int expected) { var actual = Eng35Tests.RabbitExplosion(seconds); Assert.AreEqual(expected, actual); }
public void Three_Array(int[] myArray, int[] expected) { var actual = Eng35Tests.ThreeArray(myArray); Assert.AreEqual(expected, actual); }
public void How_Many_Numbers_Divisible(int x, int y, int z, int expected) { var actual = Eng35Tests.How_Many_Numbers_Divisible_By(x, y, z); Assert.AreEqual(expected, actual); }
public void TestForDivisor(int num1, int num2, int divisor, int expected) { var actual = Eng35Tests.How_Many_Numbers_Divisible_By(num1, num2, divisor); Assert.AreEqual(expected, actual); }
public void Multiply_Ans(int x, int y, int z, int expected) { var actual = Eng35Tests.Multiply(x, y, z); Assert.AreEqual(expected, actual); }
public void DivisibleTest(int start, int end, int divisor, int expected) { var actual = Eng35Tests.How_Many_Numbers_Divisible_By(start, end, divisor); Assert.AreEqual(expected, actual); }
public void SortedArrayTest(int[] array, int[] expected) { var actual = Eng35Tests.SortArray(array); Assert.AreEqual(expected, actual); }
public void ReturnSumOfArray(int[] testArray, int expected) { var actual = Eng35Tests.SumOfArray(testArray); Assert.AreEqual(expected, actual); }
public void Loop_Dictionary(int[] arr, int expected) { var actual = Eng35Tests.Loop_Dictionary(arr); Assert.AreEqual(expected, actual); }
public void CalculatePower(double xx, double yy, double zz, double expected) { var actual = Eng35Tests.Power(xx, yy, zz); Assert.AreEqual(expected, actual); }
public void Loop_Array_Queue(int [] arr, int expected) { var actual = Eng35Tests.Array_Loop_Queue_Stack(arr); Assert.AreEqual(expected, actual); }
public void Complicated_Loop_Sum(int[] array, int expected) { var actual = Eng35Tests.ComplicatedLoop(array); Assert.AreEqual(expected, actual); }
public void arrayloopqueuestack(int [] array, int expected) { var actual = Eng35Tests.Array_loop_queue_stack(array); Assert.AreEqual(expected, actual); }
public void Array_Loop_Queue_Stack_Test(int[] array, int expected) { var actual = Eng35Tests.Array_Loop_Queue_Static(array); Assert.AreEqual(expected, actual); }
public void snapTest(int [] stest, int expected) { var actual = Eng35Tests.snapTest(stest); Assert.AreEqual(expected, actual); }
public void Rabbits_Population_Counter(int i, int expected) { var actual = Eng35Tests.Rabbit_Population(i); Assert.AreEqual(expected, actual); }
public void Sum_Subarray(int [] nums, int k, int expected) { var actual = Eng35Tests.SubarraySum(nums, k); Assert.AreEqual(expected, actual); }