FakeItEasy - The easy mocking library for .NET

A .Net dynamic fake framework for creating all types of fake objects, mocks, stubs etc. Context-aware fluent interface guides the developer.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
namespace FakeItEasyQuickstart
{
    using FakeItEasy;
    using NUnit; // any test framework will do

    public class SweetToothTests
    {
        [Test]
        public void BuyTastiestCandy_should_buy_top_selling_candy_from_shop
        {
            // make some fakes for the test
            var lollipop = A.Fake<ICandy>();
            var shop = A.Fake<ICandyShop>();

            // set up a call to return a value
            A.CallTo(() => shop.GetTopSellingCandy()).Returns(lollipop);

            // use the fake as an actual instance of the faked type
            var developer = new SweetTooth();
            developer.BuyTastiestCandy(shop);

            // asserting uses the exact same syntax as when configuring calls—
            // no need to learn another syntax
            A.CallTo(() => shop.BuyCandy(lollipop)).MustHaveHappened();
        }
    }
}

Snippet Compiler

Here is a useful .NET utility tool if you just want to do quick test your code and without requiring to launch VS.NET and creating a new project setup.

Snippet Compiler

Snippet Compiler

Link:
Snippet Compiler

Download:
2.0.8.3 for .NET 2.0 | 2.0.7.1 for .NET 1.1

  • It minimize to the system tray of task bar.
  • It can also builds WinForm EXEs, console EXEs or DLLs.
  • You can compile multiple C#, VB.NET ASP.NET code.
  • It can be used to store templates library as well.
  • IntelliSense for static members and method
  • You can also export your snippet in HTML format which can be post in your blog.

Automating Your Builds With NAnt

NAnt is a powerful scripting tool designed for developers, software process engineers, and build specialists to create an automated, repeatable process for building their developed application. NAnt provides powerful XML-based scripting and some really cool features, as Jean-Paul Boodhoo explains in his series of post “Automating Your Builds With NAnt”, which can streamline your development and unit testing effort dramatically.

Automating Your Builds With NAnt – Part 1
Automating Your Builds With NAnt – Part 2
Automating Your Builds With NAnt – Part 3
Automating Your Builds With NAnt – Part 4
Automating Your Builds With NAnt – Part 5
Automating Your Builds With NAnt – Part 6
Automating Your Builds With NAnt – Part 7