private static async Task ViewBudgetForCurrentMonth(SpecContext context) { using (var client = context.CreateClient()) { var budget = await client.GetAsync <BudgetModel>("/budgets/current"); context.Set(budget); } }
public static void StartApiServer(this SpecContext context) { var server = context.Get <ApiServer>(); if (server == null) { context.Set(new ApiServer()); } context.Get <ApiServer>().Start(); }