public void GetMaxMarkTest_marks_10()
        {
            int expected = 10;
            int actual   = Task11.GetMaxMark(marks);

            Assert.AreEqual(expected, actual);
        }
        public void CalculateMeanPerformanceTest_marks_5()
        {
            double expected = 5;
            double actual   = Task11.CalculateMeanPerformance(marks);

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 3
0
        public void TestLargestProductInAGrid()
        {
            int productLength = 4;
            var task          = new Task11(productLength);

            Assert.AreEqual(70600674, task.Run(), $"Largest product of length {productLength} in a grid is incorrect");
        }
Ejemplo n.º 4
0
 static void Main(string[] args)
 {
     Task7.ExecuteTask();
     Task8.ExecuteTask();
     Task10.ExecuteTask();
     Task11.ExecuteTask();
     Task12.ExecuteTask();
 }
        public void FindMinPerformanceStudentsTest_1_StanEric()
        {
            List <string> expected = new List <string> {
                "Stan", "Eric"
            };
            List <string> actual = Task11.FindMinPerformanceStudents(students, marks);

            CollectionAssert.AreEqual(expected, actual);
        }
        public void GetMinMarkIndexesTest_marks_i1i3()
        {
            List <int> expected = new List <int>()
            {
                1, 3
            };
            List <int> actual = Task11.GetMinMarkIndexes(marks);

            CollectionAssert.AreEqual(expected, actual);
        }
        public void SortStudentsTest_studentsMarks_sortedAlphabetically()
        {
            string[] expected = new string[] { "Butters", "Eric", "Kenny", "Kyle", "Stan" };
            Task11.SortStudents(ref students, ref marks);
            string[] actual = students;

            for (int i = 0; i < students.Length; i++)
            {
                Assert.AreEqual(expected[i], actual[i]);
            }
        }
Ejemplo n.º 8
0
 /// <summary>
 /// The main.
 /// </summary>
 /// <param name="args">
 /// The args.
 /// </param>
 private static void Main(string[] args)
 {
     Task2.ExtractArtists(FileName);
     Task3.ExtractArtistsXPath(FileName);
     Task4.DeleteAllAlbumsWithPriceMoreThan20(FileName);
     Task5.ExtractAllSongTitles(FileName);
     Task6.ExtractAllSongTitlesXpathLinq(FileName);
     Task7.CreateXmlFromTxtFile(TxtName);
     Task8.CreateAlbumXml(FileName);
     Task9.TraverseDirectory("../..");
     Task10.TraverseDirectory("../..");
     Task11.ExtractAlbumPrices(FileName);
     Task12.ExtractAlbumPricesLinq(FileName);
     Task14.ConvertXmlToXsl(FileName, XslName);
     Task16.GenerateXsdFile(FileName);
 }
Ejemplo n.º 9
0
 public ActionResult CheckAddNewOrder(Task11.NewOrderClass newOrder)
 {
     int checkID;
     checkID = _newDal.AddOrder(newOrder);
     return View(checkID);
 }
Ejemplo n.º 10
0
        public void Task11IsLeapYear(Int32 year, Boolean answer)
        {
            Boolean res = Task11.IsLeapYear(year);

            Assert.AreEqual(answer, res);
        }
Ejemplo n.º 11
0
 public static string CountCopiesByAuthor(BookShopContext context)
 {
     return(Task11.GetResult(context));
 }