Skip to content

TalhaCagatay/Test-Driven-Development

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Test-Driven-Development

Process that uses unit tests to drive the design of software.

Unit Testing

Tiny testable parts of a program independently tested for expected functionality.

Advantages

Clear intentions, knowing what you want and then creating it, encourages decoupling, easier to catch bugs early on, forces writing test cases early and lesses change of missing test cases later, helps achieve YAGNI or "you ain't gonna need it".

------------------------------------------

Phases of TDD

1) Red : Creating a test that will fail.(To be sure that test will fail when it is expected to)

2) Green : Updating a test to pass.

3) Refactor : Updating our code to meeet coding standarts and minimize duplication.

-- Repeat Them For Each Unit Test Cases --

Unit Testing Tools

MSTest

Integration based testing. Official unit tester by MS.

NUnit

Fast and works either 32 or 64 bits. Open source unit testing framework inspired by Java's JUnit.

xUnit

Set up your tests in one area and then apply them to multiple tests across your project. Open source unit tester developed for .NET.

Mocking Frameworks

1) FakeItEasy

Mocking framework where objects are considered fakes but usage determines whether they are mocks or stubs.

2) NSubstitute

Mocking framework syntax that is more succinct and concice.

3) Moq

Mocking library developed from scratch to take full advantage of .NET

About

Small Unit Testing Examples

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages