我有这样的代码:
[Fact]
public void should_return_at_least_3_users()
{
Rest.Call("http://localhost/admin/users/makeasfree/3");
var response = Rest.Call<List<Users>>("http://localhost/admin/freeusers");
response.Count.ShouldBeGreaterThan(0);
}
我试图用 TransactionScope 来解决这个问题,但不起作用。有什么方法可以在不进行整个数据库还原的情况下回滚测试更改?