Library AOP (Aspect-Oriented Programming), which allows you to implement using a free API. FluentAOP is primarily intended to simplify the adoption and use of AOP in .NET. It does not require XML files, attributes, or any other kind of configuration. Unlike most AOP implementations, its interception semantics rely solely on strongly typed method definitions and a free API.
Code example:
// Note: line indented to improve readability var foo = new Proxy<Foo>() .Target( new Foo() ) .InterceptMethod ( f => f.Go() ) .OnBefore(()=> Console.Write("Hello World!") ) .Save(); // Result: every time Go() is called a "Hello World!" message is previously printed. foo.Go();
The If statement library provides a set of extension methods for tests for AAA and BDD style tests. It provides affirmations only, and as a result, it is an agnostic test runner. XUnit test direct fork statements. This project was born because test runners must be independent of statements!
Code example:
var numbers = new List<int> { 1, 1, 2, 3 }; numbers.Should().Contain.Any(x => x == 1); numbers .Should().Count.AtLeast(1) .Should().Count.NoMoreThan(5) .Should().Count.Exactly(4) .Should().Contain.One(x => x > 2);
Fluent Assertions is a set of .NET extension methods that allow you to more naturally indicate the expected result of a TDD or BDD-style test. We currently use it in all of our internal and client projects and it is used in many open source projects. It runs on .NET 3.5, 4.0 and 4.5 (Desktop and Windows Store), Silverlight 4 and 5, and Windows Phon ...
Code example:
var theObject = "whatever"; theObject.Should().BeOfType<String>("because a {0} is set", typeof(String)); theObject.Should().NotBeNull();
A small validation library for .NET that uses a free interface and lambda expressions to create validation rules for your business objects.
Code example:
public CustomerValidator() { RuleFor(customer => customer.Surname).NotEmpty(); RuleFor(customer => customer.Forename).NotEmpty().WithMessage("Please specify a first name"); RuleFor(customer => customer.Discount).NotEqual(0).When(customer => customer.HasDiscount); RuleFor(customer => customer.Address).Length(20, 250); RuleFor(customer => customer.Postcode).Must(BeAValidPostcode).WithMessage("Please specify a valid postcode"); }
TNValidate is a free .Net checker library. This allows you to write validation logic in a way that somewhat resembles a natural language. This not only makes it easier for developers to scan, but also means that non-programmers have the best opportunity to understand and change the restrictions that fit on the data.
Code example:
// Basic validation. Validate.That(Email, "Email address").IsEmail(); // Chaining a couple of rules. Validate.That(Name, "Name").IsLongerThan(3).IsShorterThan(100);
The Fluent.NET library introduces extension methods to make .NET code more readable and more flexible for writing.
Code example:
var x = Sequence.Create<int>(0, i => i); var pair = KeyValuePair.Create(1, "Hello World"); var strings = new[] { "This", "is", "a" } .AsEnumerable(); strings = strings.With("test");
Freely, without XML, compile safe, automated, convention-oriented mappings for NHibernate.
Code example:
public class CatMap : ClassMap<Cat> { public CatMap() { Id(x => x.Id); Map(x => x.Name) .Length(16) .Not.Nullable(); Map(x => x.Sex); References(x => x.Mate); HasMany(x => x.Kittens); } }
You can programmatically manipulate the default configuration classes used by the corporate library for the kernel, instruments, and all application blocks. A free interface, opened by the corporate library, is designed to facilitate this process. A free interface can be used for all customizable toolkit functions and for the entire corporate library of application blocks, with the exception of the Check and Application Blocks for Injection policy.
Code example:
var builder = new ConfigurationSourceBuilder(); builder.ConfigureInstrumentation() .ForApplicationInstance("MyApp") .EnableLogging() .EnablePerformanceCounters();
Simple, seamless DSL for automating web applications.
Code example:
Test.Run("KnockoutJS Cart Editor", I => { I.Open("http://knockoutjs.com/examples/cartEditor.html"); I.Select("Motorcycles").From(".liveExample tr select:eq(0)"); // Select by value/text I.Select(2).From(".liveExample tr select:eq(1)"); // Select by index I.Enter(6).In(".liveExample td.quantity input:eq(0)"); I.Expect.Text("$197.70").In(".liveExample tr span:eq(1)");
Allows you to write cleaner expressions and DateTime operations.
Code example:
DateTime.Now - 1.Weeks() - 3.Days() + 14.Minutes(); DateTime.Now + 5.Years(); 3.Days().Ago(); 2.Days().Since(DateTime.Now); DateTime.Now.NextDay(); DateTime.Now.NextYear(); DateTime.Now.PreviousYear(); DateTime.Now.WeekAfter(); DateTime.Now.Midnight(); DateTime.Now.Noon(); DateTime.Now.SetTime(11, 55, 0);