Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 1.98 KB

File metadata and controls

39 lines (29 loc) · 1.98 KB

Exercises - Chapter 11 - LINQ

Exercise 1

The start solution for this exercise contains 3 projects:

  • LinqExamples: a class library in which you will have to implement some methods.
  • LinqExamples.Tests: an NUnit test project that tests the classes in the LinqExamples class library.
  • Guts.Tests: a test project that checks the correctness of your solution.

Look at the unit tests in the LinqExamples.Tests project. Your job is to make all the tests green by implementing the method that is being tested. Analyse the tests to figure out what the behavior of the tested method should be. Start with the tests in 1_SelecetExamplesTests.cs. End with the tests in 5_JoinExamplesTests.cs.

It is allowed (recommended) to read and inspect the tests in LinqExamples.Tests, but you may not alter them. Its also forbidden, of course, to alter the tests in Guts.Tests

You must use LINQ to make the tests green. It is forbidden to use loops (for, foreach, while) when you implement the methods.

Exercise 2

The start solution for this exercise contains 3 projects:

  • LinqExamples: a class library in which you will have to implement some methods.
  • LinqExamples.Tests: an NUnit test project that tests the classes in the LinqExamples class library.
  • Guts.Tests: a test project that checks the correctness of your solution.

Look at the unit tests in the LinqExamples.Tests project. Your job is to make all the tests green by implementing the method that is being tested. Analyse the tests to figure out what the behavior of the tested method should be. Start with the tests in 1_SelecetExamplesTests.cs. End with the tests in 5_JoinExamplesTests.cs.

It is allowed (recommended) to read and inspect the tests in LinqExamples.Tests, but you may not alter them. Its also forbidden, of course, to alter the tests in Guts.Tests

You must use LINQ to make the tests green. It is forbidden to use loops (for, foreach, while) when you implement the methods.