We are very happy about pull requests. Please follow these coding guidelines to help us integrate your changes.
ATDD and TDD
All code is developed Test Driven using ATDD (Acceptance Test Driven Development) and TDD (Test Driven Development).
StyleCop
All code (production, unit test and specifications) are checked by StyleCop. We have different StyleCop settings files for each type of assembly. Please check the existing settings if you add a new project.
Code Analysis
We use Code Analysis to check for common programming mistakes. Unfortunately, we cannot run it automatically during building anymore. So please, run it before making the pull request.
Suppressions are okay if they are commented and reasonable.
Naming Conventions
Unit Tests
Unit test methods should follow the convention:
- Behavior for testing a feature
- Behavior_WhenScenario for testing a special case of a feature
- BehaviorOnCause for testing a feature that is cause by an event, trigger, ...
- BehaviorOnCause_WhenScenario for chechick all above at once
Examples:
- ReturnsTodaysWheather
- ReturnsSunny_WhenItIsSunday
- ThrowsInvalidOperationExceptionOnRequestingMoonWeather
Final note: this guidelines apply to all newly written code. Some existing code may not follow these guidelines and needs refactoring (shame on us).