public void ShouldDeleteCorsAsync() { // Arrange ISystemApi systemApi = CreateSystemApi(); CorsRequest[] cors = CreateCorsRecords(); int[] ids = cors.Where(x => x.Id != null).Select(x => x.Id.Value).ToArray(); // Act List <CorsResponse> results = systemApi.DeleteCorsAsync(new SqlQuery(), ids).Result.ToList(); // Assert results.Count.ShouldBe(2); results.First().Origin.ShouldBe("http://domain.foo"); Should.Throw <ArgumentException>(() => systemApi.DeleteCorsAsync(new SqlQuery(), null)); }