<commit_before>Coding Interview Frameworks
================

Sample C# solutions to form a basis of code interviews

## Shapes Interview (Basic C#) ##
This solution is designed to test very basic knowledge of C#, it does use unit tests using nunit but the candidate need not really know about unit testing or nunit to do this.

**First**: get them to create a square class to fix the failing test.

**Second**: un-ignore the next test and create a service or something (its upto them) to fix this test also.

**Third**: ask the candidate to add a new method to the service to calculate the perimeter of a shape. (called totalPerimeter, takes an enumerable of IShape returns a double)

- Add the property '(double) Perimeter' to the IShape interface, and add also to the square class (but but dont make it work, leave as unset empty property).
- include in project the test file ShapeServiceTests. (This might need modification depending on how the candidate did the second part)
- Then ask them to use a mocking framework to test drive the creation of a totalPerimeter method so that no actual squares are used. (this should test basic knowledge of what mocking frameworks are and how to use nuget)<commit_msg>change to instructions<commit_after>Coding Interview Frameworks
================

Sample C# solutions to form a basis of code interviews

## Shapes Interview (Basic C#) ##
This solution is designed to test very basic knowledge of C#, it does use unit tests using nunit but the candidate need not really know about unit testing or nunit to do this.

## Tests ##
Basic C# knowledge, consuming interfaces, constructors, simple logic. Creating simple classes and methods, foreach and or linq. Nuget and mocking frameworks.

## Steps ##

**First**: get them to create a square class to fix the failing test.

**Second**: un-ignore the next test and create a service or something (its upto them) to fix this test also.

**Third**: ask the candidate to add a new method to the service to calculate the perimeter of a shape. (called totalPerimeter, takes an enumerable of IShape returns a double)

- Add the property 'double Perimeter { get; }' to the IShape interface, and add also to the square class (but dont make it work, leave as unset empty property).
- include in the file 'ShapeServiceTests' into the project. (This might need modification depending on how the candidate did the second part but its quite generic)
- Then ask them to use a mocking framework to test drive the creation of a totalPerimeter method so that no actual squares are used. (this should test basic knowledge of what mocking frameworks are and how to use nuget to get the package)
{'fraction_non_alphanumeric': 0.061209162598573036, 'fraction_numerical': 0.0, 'mean_word_length': 4.5041322314049586, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4566765', 'n_tokens_mistral': 643, 'n_tokens_neox': 618, 'n_words': 427}