Skip to content

Instantly share code, notes, and snippets.

$ Fixie.Console "C:\path\to\test\assembly.dll" "C:\path\to\another\test\assembly.dll" --key1 value1 --key2 "value 2"
$ Fixie.Console.exe "C:\path\to\CategoriesDemo.Tests.dll"
------ Testing Assembly CategoriesDemo.Tests.dll ------
Uncategorized
TestA
TestB1
TestB2
4 passed, 0 failed (Fixie 0.0.1.70).
using System.Linq;
using System.Reflection;
using Fixie;
using Fixie.Conventions;
namespace CategoriesDemo.Tests
{
public class CustomConvention : Convention
{
public CustomConvention(RunContext runContext)
using System;
namespace CategoriesDemo.Tests
{
public class CategorizedTests
{
public void Uncategorized()
{
Console.WriteLine("Uncategorized");
}
using System;
namespace CategoriesDemo.Tests
{
[AttributeUsage(AttributeTargets.Method, Inherited = false)]
public abstract class CategoryAttribute : Attribute
{
public string Name
{
get { return GetType().Name.Replace("Attribute", ""); }
@plioi
plioi / linebreaks_wp.cs
Created July 11, 2013 00:32
Wordpress's automatic <p> tag insertion meat grinder, portedn to C#.
static string linebreaks_wp(string body)
{
if (body.Trim() == "")
return "";
//Ensure all newlines are simply \n and that we end with a \n
body = body.Replace("\r\n", "\n")
.Replace("\r", "\n");
body = body + "\n";
using System;
using Fixie;
using Fixie.Conventions;
namespace Tests
{
[AttributeUsage(AttributeTargets.Method, Inherited = false)]
public class ExplicitAttribute : Attribute
{
}
using System;
using Should;
namespace Tests
{
public class CalculatorTests
{
private readonly Calculator calculator;
public CalculatorTests()
InstanceExecution
.Wrap((fixture, innerBehavior) =>
{
using (new TransactionScope())
innerBehavior.Execute(fixture);
});
public class IntegrationTestConvention : Convention
{
public IntegrationTestConvention()
{
Fixtures
.NameEndsWith("Tests");
Cases
.Where(method => method.Void())
.ZeroParameters();