/interview_test_csharp

Just a few programming challenges to give candidates when interviewing them for a job

Primary LanguageC#

Interview Test

Instructions

Clone this repository and open the solution in Visual Studio. Go to View -> Test Explorer to see all of the unit tests. Try running them and see how most of them are failing. That is because the implementation of the code is incorrect and needs fixing.

All of the changes you are required to do are in the InterviewTest project in the services. DO NOT change any of the unit tests!

There are two services which you need to work on. One is called MixedService which is a collection of methods that you need to correct. The summary of them should describe what they are supposed to do exactly (and not to do). When making changes you can test the correctness by running the unit tests again. You can also right click a specific test to run in debug mode.

The other service you have to work on is FizzBuzzService. It comes with an accompanying console application just to test the output of your PrintForNumber method.

FizzBuzz is actually a children's game to teach them about division in Mathematics. Starting from one, you count out loud but if the next number is divisible by 3 then instead of saying the number you say Fizz. If the number is divisible by 5 then you say Buzz. If the number is divisible by both 3 and 5 then you say FizzBuzz. This console application is just a simulation of this game starting from 1 until 100. Only problem is the method PrintForNumber is incorrect and the unit tests do indeed verify this. So your job is to make it correct!

Good luck!

How will you be evaluated?

First of all, make sure that all of the tests are passing or at least all of which you are able to fix the code of. The code will also be evaluated based on quality, performance and clarity.

Do your best to solve the problems correctly and professionally also!

Example of FizzBuzz counting

1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
16
17
Fizz
19
Buzz
Fizz
22
23
Fizz
Buzz
26
Fizz
28
29
FizzBuzz