Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq.Expressions;
- using System.Threading.Tasks;
- using NSpecInNUnit;
- namespace Row.NSpec {
- public class FPSpec<T> : nspec_as_nunit<FPSpec<T>> {
- public void BeforeAll(Action action) => beforeAll = action;
- public void BeforeAllAsync(Func<Task> task) => beforeAllAsync = task;
- public void Before(Action action) => before = action;
- public void BeforeAsync(Func<Task> task) => beforeAsync = task;
- public void BeforeEach(Action action) => beforeEach = action;
- public void BeforeEachAsync(Func<Task> task) => beforeEachAsync = task;
- public void It(string name, Action action) => it["it " + name] = action;
- public void xIt(string name, Action action) => xit["it " + name] = action;
- public void ItAsync(string name, Func<Task> task) => itAsync["it " + name] = task;
- public void xItAsync(string name, Func<Task> task) => xitAsync["it " + name] = task;
- public void Act(Action action) => act = action;
- public void ActAsync(Func<Task> task) => actAsync = task;
- public void After(Action action) => after = action;
- public void AfterAsync(Func<Task> task) => afterAsync = task;
- public void AfterEach(Action action) => afterEach = action;
- public void AfterEachAsync(Func<Task> task) => afterEachAsync = task;
- public void AfterAll(Action action) => afterAll = action;
- public void AfterAllAsync(Func<Task> task) => afterAllAsync = task;
- public void Specify(Expression<Action> action) => specify = action;
- public void xSpecify(Expression<Action> action) => xspecify = action;
- public void Context(string name, Action action) => context[name] = action;
- public void xContext(string name, Action action) => xcontext[name] = action;
- public void Describe(string name, Action action) => xdescribe[name] = action;
- public void xDescribe(string name, Action action) => xdescribe[name] = action;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement