-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change E2E class Fixture to allow parallel running
- Loading branch information
Showing
160 changed files
with
874 additions
and
1,055 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 50 additions & 4 deletions
54
test/E2ETest/Microsoft.Test.E2E.AspNet.OData/Aggregation/PagedCustomersController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,65 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Microsoft.AspNet.OData; | ||
|
||
namespace Microsoft.Test.E2E.AspNet.OData.Aggregation.Paged | ||
{ | ||
public class CustomersController : BaseCustomersController | ||
public class CustomersController | ||
{ | ||
[EnableQuery(PageSize = 5)] | ||
public IQueryable<Customer> Get() | ||
{ | ||
ResetDataSource(); | ||
var db = new AggregationContext(); | ||
return db.Customers; | ||
return Generate().AsQueryable<Customer>(); | ||
} | ||
|
||
public IList<Customer> Generate() | ||
{ | ||
IList<Customer> customers = new List<Customer>(); | ||
for (int i = 1; i < 10; i++) | ||
{ | ||
var customer = new Customer | ||
{ | ||
Id = i, | ||
Name = "Customer" + i % 2, | ||
Bucket = i % 2 == 0 ? (CustomerBucket?)CustomerBucket.Small : null, | ||
Order = new Order | ||
{ | ||
Id = i, | ||
Name = "Order" + i % 2, | ||
Price = i * 100 | ||
}, | ||
Address = new Address | ||
{ | ||
Name = "City" + i % 2, | ||
Street = "Street" + i % 2, | ||
} | ||
}; | ||
|
||
customers.Add(customer); | ||
} | ||
|
||
customers.Add(new Customer() | ||
{ | ||
Id = 10, | ||
Name = null, | ||
Bucket = CustomerBucket.Big, | ||
Address = new Address | ||
{ | ||
Name = "City1", | ||
Street = "Street", | ||
}, | ||
Order = new Order | ||
{ | ||
Id = 10, | ||
Name = "Order" + 10 % 2, | ||
Price = 0 | ||
}, | ||
}); | ||
|
||
return customers; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.