|with|type|System.Environment|
|show|current directory|
No fixture, no IDE, no build. Just the answer I wanted.
Voyages in the world of software development
|with|type|System.Environment|
|show|current directory|
foreach (Widget widget in sortedWidgetList) view.Show(widget);
view.Show(sortedWidgetList);
!path c:\mypath\*.dllHowever, if there's a lot of unnecessary files loaded by this path specification, performance can be impacted. The biggest overhead that fitSharp incurs, on top of running your System Under Test, is searching assemblies looking for classes. So if you can limit the assemblies that it has to search, this can help:
!path c:\mypath\myfixtures.dllSometimes every little bit counts!
String translation = currentToken.render(scanner);
if (currentToken.canRender(scanner)) {
String translation = currentToken.render(scanner);
...
}
Maybe<String> translation = currentToken.render(scanner);
if (!translation.isNothing()) {
result.append(translation.getValue());
...
}
public class Maybe<T> {
public static final Maybe<String> noString = new Maybe<String>("*nothing*", true);
private final T value;
private final boolean isNothing;
public Maybe(T value) { this(value, false); }
private Maybe(T value, boolean isNothing) {
this.value = value;
this.isNothing = isNothing;
}
public T getValue() { return value; }
public boolean isNothing() { return isNothing; }
}
public interface Tree<T> {
T Value { get; }
IEnumerable<Tree<T>> Branches { get; }
}
public interface Tree<T> {
T Value { get; }
Tree<T> Child { get; }
Tree<T> Sibling { get; }
}
public void AddBranch(Tree<T> newBranch) { ... }
!define TEST_RUNNER {c:\program files\fitSharp\Runner.exe}For troubleshooting and debugging, there is an alternate test runner we can use.
!define TEST_RUNNER {c:\program files\fitSharp\RunnerW.exe}This runner pops up a window before it starts executing tests.
using fitSharp.Machine.Model;
namespace fitSharp.Samples {
public class SampleSlimFixture : DomainAdapter {
private readonly SampleDomain systemUnderTest = new SampleDomain();
public object SystemUnderTest { get { return systemUnderTest; } }
public void SomeFixtureMethod() {...}
}
public class SampleDomain {
public void SomeMethod() {...}
}
}
|script|SampleSlimFixture|
|SomeFixtureMethod|
|SomeMethod|