+ Swapping to Development environment will display more detailed information about the error that occurred.
+
+
+ The Development environment shouldn't be enabled for deployed applications.
+ It can result in displaying sensitive information from exceptions to end users.
+ For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
+ and restarting the app.
+
+
+@code{
+ [CascadingParameter]
+ private HttpContext? HttpContext { get; set; }
+
+ private string? RequestId { get; set; }
+ private bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
+
+ protected override void OnInitialized() =>
+ RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier;
+}
diff --git a/src/AdventureWorksDemo.MudBlazor/Components/Pages/Home.razor b/src/AdventureWorksDemo.MudBlazor/Components/Pages/Home.razor
new file mode 100644
index 0000000..9992eba
--- /dev/null
+++ b/src/AdventureWorksDemo.MudBlazor/Components/Pages/Home.razor
@@ -0,0 +1,59 @@
+@page "/"
+@using global::MudBlazor
+
+Home
+
+Hello, world!
+Welcome to your new app, powered by MudBlazor and the .NET 8 Template!
+
+
+ You can find documentation and examples on our website here:
+
+ www.mudblazor.com
+
+
+
+
+Interactivity in this Template
+
+
+ When you opt for the "Global" Interactivity Location,
+ the render modes are defined in App.razor and consequently apply to all child components.
+ In this case, providers are globally set in the MainLayout.
+
+ On the other hand, if you choose the "Per page/component" Interactivity Location,
+ it is necessary to include the
+
+ <MudPopoverProvider />
+ <MudDialogProvider />
+ <MudSnackbarProvider />
+
+ components on every interactive page.
+
+ If a render mode is not specified for a page, it defaults to Server-Side Rendering (SSR),
+ similar to this page. While MudBlazor allows pages to be rendered in SSR,
+ please note that interactive features, such as buttons and dropdown menus, will not be functional.
+
+
+
+What's New in Blazor with the Release of .NET 8
+
+Prerendering
+
+ If you're exploring the features of .NET 8 Blazor, you might be pleasantly surprised to learn that each page is prerendered on the server, regardless of the selected render mode.
+ This means that you'll need to inject all necessary services on the server, even when opting for the wasm (WebAssembly) render mode.
+ This prerendering functionality is crucial to ensuring that WebAssembly mode feels fast and responsive, especially when it comes to initial page load times.
+ For more information on how to detect prerendering and leverage the RenderContext, you can refer to the following link:
+
+ More details
+
+
+
+
+InteractiveAuto
+
+ A discussion on how to achieve this can be found here:
+
+ More details
+
+
\ No newline at end of file
diff --git a/src/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor b/src/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor
new file mode 100644
index 0000000..fc767b2
--- /dev/null
+++ b/src/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor
@@ -0,0 +1,29 @@
+@page "/productDescription"
+@using global::MudBlazor
+@* @inject HttpClient httpClient *@
+
+
+
+Product Description
+
+Product Description
+
+
+
+
+
+
+
+
+
+@code {
+
+ private List records = new();
+ protected override async Task OnInitializedAsync()
+ {
+ // Simulate asynchronous loading to demonstrate a loading indicator
+
+ records = await httpClient.GetFromJsonAsync>("https://localhost:7277/api/ProductDescription");
+ }
+
+}
diff --git a/src/AdventureWorksDemo.MudBlazor/Components/Routes.razor b/src/AdventureWorksDemo.MudBlazor/Components/Routes.razor
new file mode 100644
index 0000000..f756e19
--- /dev/null
+++ b/src/AdventureWorksDemo.MudBlazor/Components/Routes.razor
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/src/AdventureWorksDemo.MudBlazor/Components/_Imports.razor b/src/AdventureWorksDemo.MudBlazor/Components/_Imports.razor
new file mode 100644
index 0000000..38b1dc0
--- /dev/null
+++ b/src/AdventureWorksDemo.MudBlazor/Components/_Imports.razor
@@ -0,0 +1,14 @@
+@using System.Net.Http
+@using System.Net.Http.Json
+@using Microsoft.AspNetCore.Components.Forms
+@using Microsoft.AspNetCore.Components.Routing
+@using Microsoft.AspNetCore.Components.Web
+@inject HttpClient httpClient
+@using static Microsoft.AspNetCore.Components.Web.RenderMode
+@using Microsoft.AspNetCore.Components.Web.Virtualization
+@using Microsoft.JSInterop
+@using MudBlazor
+@* @using MudBlazor.Services *@
+@using AdventureWorksDemo.MudBlazor
+@using AdventureWorksDemo.MudBlazor.Components
+@using AdventureWorksDemo.MudBlazor.Models
diff --git a/src/AdventureWorksDemo.MudBlazor/Models/ProductDescriptionModel.cs b/src/AdventureWorksDemo.MudBlazor/Models/ProductDescriptionModel.cs
new file mode 100644
index 0000000..11f884a
--- /dev/null
+++ b/src/AdventureWorksDemo.MudBlazor/Models/ProductDescriptionModel.cs
@@ -0,0 +1,17 @@
+namespace AdventureWorksDemo.MudBlazor.Models
+{
+ public record ProductDescriptionModel
+ {
+ public string? Description { get; set; }
+
+ ///
+ /// Date and time the record was last updated.
+ ///
+ public DateTime ModifiedDate { get; set; }
+
+ ///
+ /// Primary key for ProductDescription records.
+ ///
+ public int ProductDescriptionId { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/AdventureWorksDemo.MudBlazor/Program.cs b/src/AdventureWorksDemo.MudBlazor/Program.cs
new file mode 100644
index 0000000..193d1e0
--- /dev/null
+++ b/src/AdventureWorksDemo.MudBlazor/Program.cs
@@ -0,0 +1,47 @@
+using AdventureWorksDemo.MudBlazor.Components;
+
+using MudBlazor.Services;
+
+namespace AdventureWorksDemo.MudBlazor
+{
+ public class Program
+ {
+ public static void Main(string[] args)
+ {
+ var builder = WebApplication.CreateBuilder(args);
+
+ // Add MudBlazor services
+ builder.Services.AddMudServices();
+
+ // Add services to the container.
+ builder.Services.AddRazorComponents()
+ .AddInteractiveServerComponents()
+ .Services.AddHttpClient();
+ // Add services
+ builder.Services.AddScoped(sp => new HttpClient
+ {
+ BaseAddress = new Uri(builder.Configuration["Api:Base"] ?? "")
+ });
+ var app = builder.Build();
+
+ // Configure the HTTP request pipeline.
+ if (!app.Environment.IsDevelopment())
+ {
+ app.UseExceptionHandler("/Error");
+ // The default HSTS value is 30 days. You may want to change this for production
+ // scenarios, see https://aka.ms/aspnetcore-hsts.
+ app.UseHsts();
+ }
+
+ app.UseHttpsRedirection();
+
+ app.UseStaticFiles();
+ app.UseAntiforgery();
+
+ app.MapRazorComponents()
+ .AddInteractiveServerRenderMode();
+
+ app.Run();
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/AdventureWorksDemo.MudBlazor/appsettings.Development.json b/src/AdventureWorksDemo.MudBlazor/appsettings.Development.json
new file mode 100644
index 0000000..d52a1e1
--- /dev/null
+++ b/src/AdventureWorksDemo.MudBlazor/appsettings.Development.json
@@ -0,0 +1,15 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ },
+ "Api": {
+ "Base": "https://localhost:7277/api",
+ "Address": "/address",
+ "ProductCategory": "/productcategory",
+ "ProductDescription": "/productdescription"
+ },
+ "Paging": { "PageCount": 25 }
+}
\ No newline at end of file
diff --git a/src/AdventureWorksDemo.MudBlazor/appsettings.json b/src/AdventureWorksDemo.MudBlazor/appsettings.json
new file mode 100644
index 0000000..10f68b8
--- /dev/null
+++ b/src/AdventureWorksDemo.MudBlazor/appsettings.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ },
+ "AllowedHosts": "*"
+}
diff --git a/src/AdventureWorksDemo.MudBlazor/wwwroot/favicon.ico b/src/AdventureWorksDemo.MudBlazor/wwwroot/favicon.ico
new file mode 100644
index 0000000000000000000000000000000000000000..12392236657563eb8cc764f235e66d568b3a0fbb
GIT binary patch
literal 15086
zcmd5@3vgXU89or@;sb&xh>sx^P*g@JAPS{Yd_tiueWi_Q(uStVO_SUgeWuMhXESw*
zFTgS?1+faFJmjS?j^l{KW$MUNQRF4GG;Mi{HEn^W?Ir8??>T$U?zwwz&J9WFoo@fL
zyZ>{a|NgtNtV66CYy5Z%aGZ6^r!DJCmSv3_=jV^Itmjd76d=`iyvMTE0^zg30g2Uu
zMCIalk_Qgt|D3VIc-Fau=bfv0&e@3c9MWc_Cwb1k2g%_DMkXCpKVB%j4?3hAp%_Srwg;P_+2y@BU?Pv%*BDe&H|fIGkot3MH^3zhSx?rD75
zr91frjXX%R7CjY56EpVr@J#QCl7_}E{D^Lm!enjQR-q7jt3+IJx
zuIf(TGg~)l1bznc;fu-f>BFpjW)zp#*Vh2=*>YUHJz?kkGMp&?oO_kZpEqSE#J0P%
zgZhOrc)0oxvfhZudq&3yb4K0r?zJI?=+6ZDJ1+>Re%|QK9>(ij!P__hvr7>m0uDvUuIehDNu5kpji^qxqY%+;3t~DV*EYI+m@{f`DkNOx2dtq(|=~`W=&R>
zP0;Dtd0KtWxk;@1i&uU~EAM0<1l{X`Hfy(Qb;
zLjSZnc6gr64C@U2l5_h!{nqcd5a
zA<7W`cvsJdQU4-ev7$CCO}u{6_}GKAOOc_E899F?q%kz3wO^A}u)pHdzoF{KbJ2Mr
z`ZcZ6(zof1n0)>^1CYHhvHq<~NdGOW4*r>uV~l@CE6=+>Fz|gq#fkf_LjRW_Bf59S
z_d)k+jGsmN{B2=}gU59oQ0jv{>QI!uV9=lQ%h+cmUK~uUKb?=gcv8I1a_mT0pME?}
zt}Mqm`kGO9;t}a5Nu$CF{Im0oRbN*tINoDBE&x6lU0@=iGMJ%73^Zf)o3M&0Db57NNFVFTOVz2*r
zd;5FQ@AoB;D|zkaU90PKE?y2i9vOzu{^%K=`V%zfHCv9I5N^R5H(8uT#F>yy1TDq(
zrEW>#X7v4RzJz^5_|z1K$+}l0;PaapyDtE3(*7qM_ai0WzpJ+|rXB1roAjqL=yN4f
z4BbIco^|ey(_QHA?fusuq&Dp3`QFb}(qGoWf1Cyz{&sNL;jWSTC54<~e5c6<~Nlvw8h?jmG`)ecy?p|)sC)qb
z5$v}t*N2k`7A>pJhlu`(Ji$rD;&Ca!adsDMn01Hp%=C_B`P+9u{qU9EUO
zu0-+Skbko87e-?}75iW^c_#g^w)dV~t<5Sv?A|&8+f`kjPB32|RN?b2P8mvscOCpBoi^6vLUd7h0!dBm5n|BPke5Ze1S
z8rgSwHeKUAyK@4cI)AVBK4DhdqZ$tF$M#SCsjU`OlO(_+NHj(xTkdK2MN-LjUHD
zWBJqtx@@|epSob5384*8UyA5iz*u-<8t`k~A$KkKaJbJM5sdEI)9GGlYRbMbVT
zv$!YZW8dfV-=*G*1ohsX`I`bKZ!ZeUW98d_;tLAv6rIDiXB6;dC}PTvvob^eZhFH8Bd`wYCVl6X;AK|bvx|3Na_-;MVHbJBqyj5hs7
zXnWaR$iJd;Wxj%Z@>w5_l}~!j>sl}Qs1P*pF(P{B*%>O1{05#m{w(IRh+moQC;n~A
z9LYyQx(^0V!~S1>7f&?6-Cm}v(B1CEp8N&W>GNN;t8;Z(zhVq@oB840f^uIP=xbho
zX^lSD*YB1Xesqq$TJjON-uv}J(~NdBY8Q|zmTeNy!A9udnYUz6_C
zhQE`dF+ErGk$6WC%+W|6+rsUax`HMh+Xh~Ll!mE~@Q;j5wNGiEio81!?cn__Lp6Lx
zh^xQLk!|4Xa52W$J+RfZXOB>x(iY?kCydv6XIpj#`f@sSS_PdD7tmq_)#`({pZ000
zz14n;x2!qm!4Zsw5}lQ*kq7){$f3Em8S%=Al9v2elvSg{9?Y9Ll0FFp|LA;pMSaua
z#g*gMHKo6E&Zd#Xi6Osy&BooJsyo``R3n}@*WMCw5XAdbnxx+`?fcCrJ@&+-(Y8y`
zSHHp-{hb$!!8=u~JyG0h^7MBB(1HA2dP}p5)?vB#R>NmFT+Y{UK7=q!$(qCm5mFei
zYLQY%H9H6HU(>&HV_$LW_CB_KJ7e2-GpiLTeJ-=wCowCF-VdI{d!jXI=y=O5)mgk$_W&QN!4JMK#^Oq!H^nlS
z!;f0W>75v*$$0bG*f}0Jjle;ix#t)`kF&YR!;b=77SiKARCh0YPv6c4ynAivYR0^7
zLD{|jTjOOO58O3*=j4#yJDY}nF1-hC>}&=7BC)pTj
zvpe!P0ra
Date: Wed, 15 Jan 2025 17:29:18 +0000
Subject: [PATCH 02/16] Basic datagrid functionality
---
.../Components/Pages/ProductDescription.razor | 28 +++++++++++--------
.../appsettings.Development.json | 8 +++---
2 files changed, 21 insertions(+), 15 deletions(-)
diff --git a/src/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor b/src/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor
index fc767b2..96a6632 100644
--- a/src/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor
+++ b/src/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor
@@ -1,29 +1,35 @@
@page "/productDescription"
@using global::MudBlazor
-@* @inject HttpClient httpClient *@
-
-
+@using Microsoft.Extensions.Configuration
+@inject IConfiguration Configuration
Product DescriptionProduct Description
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@code {
+
+
private List records = new();
protected override async Task OnInitializedAsync()
{
+
// Simulate asynchronous loading to demonstrate a loading indicator
- records = await httpClient.GetFromJsonAsync>("https://localhost:7277/api/ProductDescription");
+ string url = Configuration["Api:base"]+ Configuration["Api:productdescription"];
+ records = (await httpClient.GetFromJsonAsync>(url) ?? new());
}
}
diff --git a/src/AdventureWorksDemo.MudBlazor/appsettings.Development.json b/src/AdventureWorksDemo.MudBlazor/appsettings.Development.json
index d52a1e1..b49edf4 100644
--- a/src/AdventureWorksDemo.MudBlazor/appsettings.Development.json
+++ b/src/AdventureWorksDemo.MudBlazor/appsettings.Development.json
@@ -6,10 +6,10 @@
}
},
"Api": {
- "Base": "https://localhost:7277/api",
- "Address": "/address",
- "ProductCategory": "/productcategory",
- "ProductDescription": "/productdescription"
+ "Base": "https://localhost:7277/api/",
+ "Address": "address",
+ "ProductCategory": "productcategory",
+ "ProductDescription": "productdescription"
},
"Paging": { "PageCount": 25 }
}
\ No newline at end of file
From b32731350c87c952d2fe1f692265a4f11f36e742 Mon Sep 17 00:00:00 2001
From: CodeTile <43536260+CodeTile@users.noreply.github.com>
Date: Thu, 16 Jan 2025 09:37:56 +0000
Subject: [PATCH 03/16] Product Description Paging and filtering
---
.../Components/Pages/ProductDescription.razor | 30 +++++++++++++++----
.../Components/_Imports.razor | 4 ++-
2 files changed, 27 insertions(+), 7 deletions(-)
diff --git a/src/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor b/src/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor
index 96a6632..997eadc 100644
--- a/src/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor
+++ b/src/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor
@@ -1,15 +1,22 @@
@page "/productDescription"
@using global::MudBlazor
-@using Microsoft.Extensions.Configuration
+
@inject IConfiguration Configuration
Product DescriptionProduct Description
-
-
+Modify the product descriptions.
+
+
+
+ Periodic Elements
+
+
+
-
+
@@ -20,8 +27,9 @@
@code {
+ // this page loads all records into the page as there are not many and it is a lookup table.
-
+ private string? _searchString;
private List records = new();
protected override async Task OnInitializedAsync()
{
@@ -31,5 +39,15 @@
string url = Configuration["Api:base"]+ Configuration["Api:productdescription"];
records = (await httpClient.GetFromJsonAsync>(url) ?? new());
}
-
+ // quick filter - filter globally across multiple columns with the same input
+ private Func _quickFilter => x =>
+ {
+ if (string.IsNullOrWhiteSpace(_searchString)
+ || x.Description!.Contains(_searchString, StringComparison.OrdinalIgnoreCase)
+ || x.ModifiedDate!.ToShortDateString().Contains(_searchString, StringComparison.OrdinalIgnoreCase)
+ || x.ModifiedDate!.ToLongDateString().Contains(_searchString, StringComparison.OrdinalIgnoreCase))
+ return true;
+
+ return false;
+ };
}
diff --git a/src/AdventureWorksDemo.MudBlazor/Components/_Imports.razor b/src/AdventureWorksDemo.MudBlazor/Components/_Imports.razor
index 38b1dc0..42017b4 100644
--- a/src/AdventureWorksDemo.MudBlazor/Components/_Imports.razor
+++ b/src/AdventureWorksDemo.MudBlazor/Components/_Imports.razor
@@ -9,6 +9,8 @@
@using Microsoft.JSInterop
@using MudBlazor
@* @using MudBlazor.Services *@
-@using AdventureWorksDemo.MudBlazor
+@* @using AdventureWorksDemo.MudBlazor *@
@using AdventureWorksDemo.MudBlazor.Components
@using AdventureWorksDemo.MudBlazor.Models
+
+@using Microsoft.Extensions.Configuration
\ No newline at end of file
From 0f3420875c3e93fa5ad8bbe1be58444c442d5c37 Mon Sep 17 00:00:00 2001
From: CodeTile <43536260+CodeTile@users.noreply.github.com>
Date: Fri, 24 Jan 2025 15:45:57 +0000
Subject: [PATCH 04/16] Filter and sorting added to PagingFilter in Blazor
front end
---
.../Controllers/GenericControllerBase.cs | 2 +-
.../Paging/PagedList.cs | 20 ++-
.../Components/Pages/ProductDescription.razor | 116 ++++++++++++++----
.../Models/PagedList.cs | 69 +++++++++++
4 files changed, 179 insertions(+), 28 deletions(-)
create mode 100644 src/AdventureWorksDemo.MudBlazor/Models/PagedList.cs
diff --git a/src/API/AdventureWorksDemo.API/Controllers/GenericControllerBase.cs b/src/API/AdventureWorksDemo.API/Controllers/GenericControllerBase.cs
index 323d065..82d3ec5 100644
--- a/src/API/AdventureWorksDemo.API/Controllers/GenericControllerBase.cs
+++ b/src/API/AdventureWorksDemo.API/Controllers/GenericControllerBase.cs
@@ -45,7 +45,7 @@ public virtual async Task DeleteAsync(int id)
[HttpGet()]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
- public virtual async Task FindAllAsync([FromQuery] PageingFilter pageingFilter)
+ public virtual async Task FindAllAsync([FromBody] PageingFilter pageingFilter)
{
WriteToTraceLog(nameof(GenericControllerBase), nameof(FindAllAsync), "pageingFilter");
diff --git a/src/API/AdventureWorksDemo.Data/Paging/PagedList.cs b/src/API/AdventureWorksDemo.Data/Paging/PagedList.cs
index 39ba869..7cd9d16 100644
--- a/src/API/AdventureWorksDemo.Data/Paging/PagedList.cs
+++ b/src/API/AdventureWorksDemo.Data/Paging/PagedList.cs
@@ -52,13 +52,29 @@ public static async Task> CreateAsync(IQueryable source, int pag
public class PageingFilter
{
+ private int _pageNumber = 1;
private int _pageSize = 25;
- public int PageNumber { get; set; } = 1;
+
+ public int PageNumber
+ {
+ get => _pageNumber;
+ set
+ {
+ _pageNumber = value;
+ if (value < 1)
+ _pageNumber = 1;
+ }
+ }
public int PageSize
{
get => _pageSize;
- set => _pageSize = (value > MaxPageSize) ? MaxPageSize : value;
+ set
+ {
+ _pageSize = (value > MaxPageSize) ? MaxPageSize : value;
+ if (_pageSize < 1)
+ _pageNumber = 25;
+ }
}
internal int MaxPageSize { get; set; } = 100;
diff --git a/src/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor b/src/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor
index 997eadc..c4e40e0 100644
--- a/src/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor
+++ b/src/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor
@@ -1,6 +1,7 @@
@page "/productDescription"
+@using System.Text
+@using System.Net.Mime
@using global::MudBlazor
-
@inject IConfiguration Configuration
Product Description
@@ -8,46 +9,111 @@
Product DescriptionModify the product descriptions.
-
+
+@* *@
+
- Periodic Elements
+ Product Description
-
-
+ @* *@
+
+
-
+
-
+
-
+
+
@code {
// this page loads all records into the page as there are not many and it is a lookup table.
+ // private string? _searchString;
+ // private List records = new();
+ private MudDataGrid dataGrid = new();
+ string? searchString = null;
- private string? _searchString;
- private List records = new();
- protected override async Task OnInitializedAsync()
+
+ private async Task> ServerReload(GridState state)
{
- // Simulate asynchronous loading to demonstrate a loading indicator
- string url = Configuration["Api:base"]+ Configuration["Api:productdescription"];
- records = (await httpClient.GetFromJsonAsync>(url) ?? new());
+ PagedList paging = new();
+ IEnumerable data = new List();
+ PageingFilter filter = PageingFilter.SetByGridState(state);
+
+ string url = $"{Configuration["Api:base"]}{Configuration["Api:productdescription"]}";
+ var json = System.Text.Json.JsonSerializer.Serialize(filter);
+ var request = new HttpRequestMessage
+ {
+ Method= HttpMethod.Get,
+ RequestUri = new Uri(url),
+ Content = new StringContent(json,
+ Encoding.UTF8,
+ MediaTypeNames.Application.Json),
+ };
+
+ var response = await httpClient.SendAsync(request).ConfigureAwait(false);
+ if (response.IsSuccessStatusCode)
+ {
+ data = (await response!.Content!.ReadFromJsonAsync>()) ?? new List();
+ paging = PagedList.FromIEnumerable(response.Headers.GetValues("X-Pagination").SingleOrDefault());
+
+ }
+
+ await Task.Delay(300);
+ // data = data.Where(item =>
+ // {
+ // if (string.IsNullOrWhiteSpace(searchString))
+ // return true;
+ // if ($"{item.Description} {item.ModifiedDate.ToString("d")}".Contains(searchString))
+ // return true;
+ // return false;
+ // }).ToArray();
+
+ // var sortDefinition = state.SortDefinitions.FirstOrDefault();
+ // if (sortDefinition != null)
+ // {
+ // switch (sortDefinition.SortBy)
+ // {
+ // case nameof(ProductDescriptionModel.Description):
+ // data = data.OrderByDirection(
+ // sortDefinition.Descending ? SortDirection.Descending : SortDirection.Ascending,
+ // o => o.Description
+ // );
+ // break;
+ // case nameof(ProductDescriptionModel.ModifiedDate):
+ // data = data.OrderByDirection(
+ // sortDefinition.Descending ? SortDirection.Descending : SortDirection.Ascending,
+ // o => o.ModifiedDate
+ // );
+ // break;
+ // }
+ // }
+
+ return new GridData
+ {
+ TotalItems = paging.TotalCount,
+ Items = data,
+ };
}
- // quick filter - filter globally across multiple columns with the same input
- private Func _quickFilter => x =>
+
+ private Task OnClear()
{
- if (string.IsNullOrWhiteSpace(_searchString)
- || x.Description!.Contains(_searchString, StringComparison.OrdinalIgnoreCase)
- || x.ModifiedDate!.ToShortDateString().Contains(_searchString, StringComparison.OrdinalIgnoreCase)
- || x.ModifiedDate!.ToLongDateString().Contains(_searchString, StringComparison.OrdinalIgnoreCase))
- return true;
-
- return false;
- };
+ searchString = null;
+ return dataGrid.ReloadServerData();
+ }
+ private Task OnSearch(string text)
+ {
+ searchString = text;
+ return dataGrid.ReloadServerData();
+ }
}
diff --git a/src/AdventureWorksDemo.MudBlazor/Models/PagedList.cs b/src/AdventureWorksDemo.MudBlazor/Models/PagedList.cs
new file mode 100644
index 0000000..c733c0d
--- /dev/null
+++ b/src/AdventureWorksDemo.MudBlazor/Models/PagedList.cs
@@ -0,0 +1,69 @@
+using MudBlazor;
+
+namespace AdventureWorksDemo.MudBlazor.Models
+{
+ public class PagedList
+ {
+ public int CurrentPage { get; set; }
+ public int PageSize { get; set; }
+ public int TotalCount { get; set; }
+ public int TotalPages { get; set; }
+
+ public static PagedList FromIEnumerable(string? value)
+ {
+ if (value == null)
+ return new PagedList();
+ var values = value!.Split(',');
+ return new PagedList()
+ {
+ CurrentPage = PagedList.ExtractValue(values, nameof(CurrentPage)),
+ PageSize = PagedList.ExtractValue(values, nameof(PageSize)),
+ TotalCount = PagedList.ExtractValue(values, nameof(TotalCount)),
+ TotalPages = PagedList.ExtractValue(values, nameof(TotalPages)),
+ }
+ ;
+ }
+
+ private static int ExtractValue(string[] values, string key)
+ {
+ string? extracted = values.SingleOrDefault(m => m.Contains(key, StringComparison.CurrentCultureIgnoreCase))?.Split(':')[1].Replace('}', ' ');
+
+ return int.Parse(extracted ?? "0");
+ }
+ }
+
+ public class PageingFilter
+ {
+ public string[]? Filter { get; set; } = null;
+ public int PageNumber { get; set; } = 1;
+ public int PageSize { get; set; } = 25;
+ public string[]? Sorting { get; set; } = null;
+
+ public static PageingFilter SetByGridState(GridState state)
+ {
+ var filters = state.FilterDefinitions;
+ var filterArray = (from IFilterDefinition filter in filters
+ select $"{filter!.Column!.PropertyName} | {filter.Operator} | {filter.Value}").ToArray();
+
+ return new PageingFilter()
+ {
+ PageNumber = state.Page,
+ PageSize = state.PageSize,
+ Filter = filterArray,
+ Sorting = SortingArray(state.SortDefinitions),
+ };
+ }
+
+ private static string DescendingText(bool isDescending) => isDescending ? "DESC" : "";
+
+ private static string[]? SortingArray(ICollection>? sortDefinitions)
+ {
+ if (sortDefinitions == null || sortDefinitions.Count == 0)
+ return null;
+
+ return (from m in sortDefinitions
+ select $"{m.SortBy} | {DescendingText(m.Descending)}"
+ ).ToArray();
+ }
+ }
+}
\ No newline at end of file
From 9063bd3abcf873c0852a3f1d125aea5faab26dc8 Mon Sep 17 00:00:00 2001
From: CodeTile <43536260+CodeTile@users.noreply.github.com>
Date: Sun, 26 Jan 2025 15:22:18 +0000
Subject: [PATCH 05/16] Update Tests
---
.../AdventureWorksDemo.API.csproj | 4 +-
.../AdventureWorksDemo.API/appsettings.json | 6 +-
...reWorksDemo.Common.Tests.Extensions.csproj | 9 +
.../IntegerExtentions.cs | 12 +
.../StringExtensions.cs | 0
.../AdventureWorksDemo.Common.Tests.csproj | 24 +-
...AdventureWorksDemo.Data.Tests.nUnit.csproj | 25 +-
.../Fakes/FakeDbContext_Address.cs | 112 +++
.../{Helpers => Fakes}/MockedDbContext.cs | 2 +-
.../GlobalUsings.cs | 4 +-
.../ResultTests.cs | 36 +-
.../ProductCategoryValidatorTests.cs | 57 --
.../ProductDescriptionValidatorTests.cs | 56 --
...entureWorksDemo.Data.Tests.reqnroll.csproj | 21 +-
.../AddressServiceFindTests.feature | 102 ++-
...ProductDescriptionServiceFindTests.feature | 94 ++-
.../ProductCategoryServiceAddTests.feature.cs | 272 +++----
...oductCategoryServiceDeleteTests.feature.cs | 62 +-
.../ProductCategoryServiceFindTests.feature | 89 ++-
...ProductCategoryServiceFindTests.feature.cs | 688 ++++++++++++------
...oductCategoryServiceUpdateTests.feature.cs | 266 +++----
.../StepDefinitions/StepDefinitions.cs | 4 +-
.../AdventureWorksDemo.Data.Tests.csproj | 45 ++
.../Fakes}/FakeDbContext_Address.cs | 13 +-
.../Fakes/MockedDbContext.cs | 22 +
.../MSTestSettings.cs | 1 +
.../Validaton}/AddressValidatorTests.cs | 181 +++--
.../ProductCategoryValidatorTests.cs | 63 ++
.../ProductDescriptionValidatorTests.cs | 63 ++
.../AdventureWorksDemo.Data.csproj | 4 +-
.../Paging/PagedList.cs | 19 +-
.../Services/BaseService.cs | 2 +
src/AdventureWorksDemo.sln | 33 +-
.../AdventureWorksDemo.MudBlazor.csproj | 4 +-
.../Components/App.razor | 0
.../Components/Layout/MainLayout.razor | 0
.../Components/Layout/NavMenu.razor | 0
.../Components/Pages/Error.razor | 0
.../Components/Pages/Home.razor | 0
.../Components/Pages/ProductDescription.razor | 0
.../Components/Routes.razor | 0
.../Components/_Imports.razor | 0
.../Models/PagedList.cs | 0
.../Models/ProductDescriptionModel.cs | 0
.../AdventureWorksDemo.MudBlazor/Program.cs | 0
.../appsettings.Development.json | 0
.../appsettings.json | 0
.../wwwroot/favicon.ico | Bin
48 files changed, 1481 insertions(+), 914 deletions(-)
create mode 100644 src/API/AdventureWorksDemo.Common.Tests.Extensions/AdventureWorksDemo.Common.Tests.Extensions.csproj
create mode 100644 src/API/AdventureWorksDemo.Common.Tests.Extensions/IntegerExtentions.cs
rename src/API/{AdventureWorksDemo.Common.Tests/Extensions => AdventureWorksDemo.Common.Tests.Extensions}/StringExtensions.cs (100%)
create mode 100644 src/API/AdventureWorksDemo.Data.Tests.nUnit/Fakes/FakeDbContext_Address.cs
rename src/API/AdventureWorksDemo.Data.Tests.nUnit/{Helpers => Fakes}/MockedDbContext.cs (89%)
delete mode 100644 src/API/AdventureWorksDemo.Data.Tests.nUnit/Validation/ProductCategoryValidatorTests.cs
delete mode 100644 src/API/AdventureWorksDemo.Data.Tests.nUnit/Validation/ProductDescriptionValidatorTests.cs
create mode 100644 src/API/AdventureWorksDemo.Data.Tests/AdventureWorksDemo.Data.Tests.csproj
rename src/API/{AdventureWorksDemo.Data.Tests.nUnit/Helpers => AdventureWorksDemo.Data.Tests/Fakes}/FakeDbContext_Address.cs (90%)
create mode 100644 src/API/AdventureWorksDemo.Data.Tests/Fakes/MockedDbContext.cs
create mode 100644 src/API/AdventureWorksDemo.Data.Tests/MSTestSettings.cs
rename src/API/{AdventureWorksDemo.Data.Tests.nUnit/Validation => AdventureWorksDemo.Data.Tests/Validaton}/AddressValidatorTests.cs (66%)
create mode 100644 src/API/AdventureWorksDemo.Data.Tests/Validaton/ProductCategoryValidatorTests.cs
create mode 100644 src/API/AdventureWorksDemo.Data.Tests/Validaton/ProductDescriptionValidatorTests.cs
rename src/{ => FrontEnd}/AdventureWorksDemo.MudBlazor/AdventureWorksDemo.MudBlazor.csproj (81%)
rename src/{ => FrontEnd}/AdventureWorksDemo.MudBlazor/Components/App.razor (100%)
rename src/{ => FrontEnd}/AdventureWorksDemo.MudBlazor/Components/Layout/MainLayout.razor (100%)
rename src/{ => FrontEnd}/AdventureWorksDemo.MudBlazor/Components/Layout/NavMenu.razor (100%)
rename src/{ => FrontEnd}/AdventureWorksDemo.MudBlazor/Components/Pages/Error.razor (100%)
rename src/{ => FrontEnd}/AdventureWorksDemo.MudBlazor/Components/Pages/Home.razor (100%)
rename src/{ => FrontEnd}/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor (100%)
rename src/{ => FrontEnd}/AdventureWorksDemo.MudBlazor/Components/Routes.razor (100%)
rename src/{ => FrontEnd}/AdventureWorksDemo.MudBlazor/Components/_Imports.razor (100%)
rename src/{ => FrontEnd}/AdventureWorksDemo.MudBlazor/Models/PagedList.cs (100%)
rename src/{ => FrontEnd}/AdventureWorksDemo.MudBlazor/Models/ProductDescriptionModel.cs (100%)
rename src/{ => FrontEnd}/AdventureWorksDemo.MudBlazor/Program.cs (100%)
rename src/{ => FrontEnd}/AdventureWorksDemo.MudBlazor/appsettings.Development.json (100%)
rename src/{ => FrontEnd}/AdventureWorksDemo.MudBlazor/appsettings.json (100%)
rename src/{ => FrontEnd}/AdventureWorksDemo.MudBlazor/wwwroot/favicon.ico (100%)
diff --git a/src/API/AdventureWorksDemo.API/AdventureWorksDemo.API.csproj b/src/API/AdventureWorksDemo.API/AdventureWorksDemo.API.csproj
index 3a505fb..5543dd1 100644
--- a/src/API/AdventureWorksDemo.API/AdventureWorksDemo.API.csproj
+++ b/src/API/AdventureWorksDemo.API/AdventureWorksDemo.API.csproj
@@ -9,8 +9,8 @@
-
-
+
+
diff --git a/src/API/AdventureWorksDemo.API/appsettings.json b/src/API/AdventureWorksDemo.API/appsettings.json
index ec04bc1..bcb4d27 100644
--- a/src/API/AdventureWorksDemo.API/appsettings.json
+++ b/src/API/AdventureWorksDemo.API/appsettings.json
@@ -5,5 +5,9 @@
"Microsoft.AspNetCore": "Warning"
}
},
- "AllowedHosts": "*"
+ "AllowedHosts": "*",
+ "Paging": {
+ "MaxRowsPerPage": 100,
+ "RowsPerPage": 25
+ }
}
\ No newline at end of file
diff --git a/src/API/AdventureWorksDemo.Common.Tests.Extensions/AdventureWorksDemo.Common.Tests.Extensions.csproj b/src/API/AdventureWorksDemo.Common.Tests.Extensions/AdventureWorksDemo.Common.Tests.Extensions.csproj
new file mode 100644
index 0000000..125f4c9
--- /dev/null
+++ b/src/API/AdventureWorksDemo.Common.Tests.Extensions/AdventureWorksDemo.Common.Tests.Extensions.csproj
@@ -0,0 +1,9 @@
+
+
+
+ net9.0
+ enable
+ enable
+
+
+
diff --git a/src/API/AdventureWorksDemo.Common.Tests.Extensions/IntegerExtentions.cs b/src/API/AdventureWorksDemo.Common.Tests.Extensions/IntegerExtentions.cs
new file mode 100644
index 0000000..cbcb6ce
--- /dev/null
+++ b/src/API/AdventureWorksDemo.Common.Tests.Extensions/IntegerExtentions.cs
@@ -0,0 +1,12 @@
+namespace AdventureWorksDemo.Common.Tests.Extensions
+{
+ public static class IntegerExtentions
+ {
+ public static Guid ToGuid(this int value)
+ {
+ byte[] bytes = new byte[16];
+ BitConverter.GetBytes(value).CopyTo(bytes, 0);
+ return new Guid(bytes);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/API/AdventureWorksDemo.Common.Tests/Extensions/StringExtensions.cs b/src/API/AdventureWorksDemo.Common.Tests.Extensions/StringExtensions.cs
similarity index 100%
rename from src/API/AdventureWorksDemo.Common.Tests/Extensions/StringExtensions.cs
rename to src/API/AdventureWorksDemo.Common.Tests.Extensions/StringExtensions.cs
diff --git a/src/API/AdventureWorksDemo.Common.Tests/AdventureWorksDemo.Common.Tests.csproj b/src/API/AdventureWorksDemo.Common.Tests/AdventureWorksDemo.Common.Tests.csproj
index 00e18a9..0dfb9cc 100644
--- a/src/API/AdventureWorksDemo.Common.Tests/AdventureWorksDemo.Common.Tests.csproj
+++ b/src/API/AdventureWorksDemo.Common.Tests/AdventureWorksDemo.Common.Tests.csproj
@@ -9,19 +9,23 @@
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
-
-
+
+
+
+
+
+
+
diff --git a/src/API/AdventureWorksDemo.Data.Tests.nUnit/AdventureWorksDemo.Data.Tests.nUnit.csproj b/src/API/AdventureWorksDemo.Data.Tests.nUnit/AdventureWorksDemo.Data.Tests.nUnit.csproj
index 795a3a4..99536f4 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.nUnit/AdventureWorksDemo.Data.Tests.nUnit.csproj
+++ b/src/API/AdventureWorksDemo.Data.Tests.nUnit/AdventureWorksDemo.Data.Tests.nUnit.csproj
@@ -2,36 +2,37 @@
net9.0
+ latestenableenable
-
false
- true
- false
-
-
-
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
- allruntime; build; native; contentfiles; analyzers; buildtransitive
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
-
+
+
+
+
+
diff --git a/src/API/AdventureWorksDemo.Data.Tests.nUnit/Fakes/FakeDbContext_Address.cs b/src/API/AdventureWorksDemo.Data.Tests.nUnit/Fakes/FakeDbContext_Address.cs
new file mode 100644
index 0000000..f3b6ab5
--- /dev/null
+++ b/src/API/AdventureWorksDemo.Data.Tests.nUnit/Fakes/FakeDbContext_Address.cs
@@ -0,0 +1,112 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using AdventureWorksDemo.Data.Entities;
+
+namespace AdventureWorksDemo.Data.Tests.nUnit.Fakes
+{
+ [ExcludeFromCodeCoverage]
+ internal static class FakeDbContext
+ {
+ [ExcludeFromCodeCoverage]
+ internal static List FakeAddresses
+ {
+ get
+ {
+ return [
+ new Address()
+ {
+ AddressId = 1,
+ AddressLine1 = "2564 S. Redwood Rd.",
+ City = "Riverton",
+ StateProvince = "Utah",
+ CountryRegion = "United States",
+ PostalCode = "84065",
+ Rowguid = new Guid("E299E96D-63CB-4ACC-9BFD-5F0C23AE5820"),
+ ModifiedDate = Convert.ToDateTime("12 May 2005 01:52:23")
+ },
+ new Address()
+ {
+ AddressId = 2,
+ AddressLine1 = "9905 Three Rivers Drive",
+ City = "Kelso",
+ StateProvince = "Washington",
+ CountryRegion = "United States",
+ PostalCode = "98626",
+ Rowguid = new Guid("01A85112-6EE1-4F2C-9212-1C2ABC612E67"),
+ ModifiedDate = Convert.ToDateTime("12 May 2005 01:52:23")
+ },
+ new Address()
+ {
+ AddressId = 3,
+ AddressLine1 = "25 First Canadian Place",
+ City = "Toronto",
+ StateProvince = "Ontario",
+ CountryRegion = "Canada",
+ PostalCode = "M4B 1V5",
+ Rowguid = new Guid("07A009B2-1421-4597-AB85-22BCE3C82B2C"),
+ ModifiedDate = Convert.ToDateTime("12 May 2005 01:52:24")
+ },
+ new Address()
+ {
+ AddressId = 4,
+ AddressLine1 = "2560 Bay Street",
+ City = "Toronto",
+ StateProvince = "Ontario",
+ CountryRegion = "Canada",
+ PostalCode = "M4B 1V7",
+ Rowguid = new Guid("726819A8-1B02-4EFD-AEB9-3FD801D9F153"),
+ ModifiedDate = Convert.ToDateTime("13 May 2005 01:45:23")
+ },
+ new Address()
+ {
+ AddressId = 5,
+ AddressLine1 = "9992 Whipple Rd",
+ City = "Union City",
+ StateProvince = "California",
+ CountryRegion = "United States",
+ PostalCode = "94587",
+ Rowguid = new Guid("88258A1B-B50F-440F-93B9-5D7AF831D5FC"),
+ ModifiedDate = Convert.ToDateTime("14 May 2005 06:52:23")
+ },
+ new Address()
+ {
+ AddressId = 6,
+ AddressLine1 = "25915 140th Ave Ne",
+ City = "Bellevue",
+ StateProvince = "Washington",
+ CountryRegion = "United States",
+ PostalCode = "98004",
+ Rowguid = new Guid("0D46F203-CDB6-4495-83F5-A97FF0CEC174"),
+ ModifiedDate = Convert.ToDateTime("28 May 2005 22:52:23")
+ },
+ new Address()
+ {
+ AddressId = 7,
+ AddressLine1 = "2574 Milton Park",
+ City = "Oxford",
+ StateProvince = "England",
+ CountryRegion = "United Kingdom",
+ PostalCode = "OX14 4SE",
+ Rowguid = new Guid("62D0C689-CF44-4AB3-9C3E-6142F4E0101C"),
+ ModifiedDate = Convert.ToDateTime("12 June 2005 01:52:23")
+ }
+ ];
+ }
+ }
+
+ internal static Address NewAddress1() => new()
+ {
+ AddressLine1 = "Ping",
+ AddressLine2 = "Pong",
+ City = "Ping Pong",
+ StateProvince = "Foo",
+ CountryRegion = "Bar",
+ PostalCode = "98765",
+ };
+ }
+}
\ No newline at end of file
diff --git a/src/API/AdventureWorksDemo.Data.Tests.nUnit/Helpers/MockedDbContext.cs b/src/API/AdventureWorksDemo.Data.Tests.nUnit/Fakes/MockedDbContext.cs
similarity index 89%
rename from src/API/AdventureWorksDemo.Data.Tests.nUnit/Helpers/MockedDbContext.cs
rename to src/API/AdventureWorksDemo.Data.Tests.nUnit/Fakes/MockedDbContext.cs
index f60dfe9..8212b96 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.nUnit/Helpers/MockedDbContext.cs
+++ b/src/API/AdventureWorksDemo.Data.Tests.nUnit/Fakes/MockedDbContext.cs
@@ -4,7 +4,7 @@
using Moq;
-namespace AdventureWorksDemo.Data.Tests.nUnit.Helpers
+namespace AdventureWorksDemo.Data.Tests.nUnit.Fakes
{
internal static class MockedDbContext
{
diff --git a/src/API/AdventureWorksDemo.Data.Tests.nUnit/GlobalUsings.cs b/src/API/AdventureWorksDemo.Data.Tests.nUnit/GlobalUsings.cs
index cc79662..867487d 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.nUnit/GlobalUsings.cs
+++ b/src/API/AdventureWorksDemo.Data.Tests.nUnit/GlobalUsings.cs
@@ -1,6 +1,4 @@
-global using NUnit.Framework;
-
-global using FluentAssertions;
+global using NUnit.Framework;
global using Microsoft.Extensions.Time.Testing;
diff --git a/src/API/AdventureWorksDemo.Data.Tests.nUnit/ResultTests.cs b/src/API/AdventureWorksDemo.Data.Tests.nUnit/ResultTests.cs
index dc44d3f..2a4e03c 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.nUnit/ResultTests.cs
+++ b/src/API/AdventureWorksDemo.Data.Tests.nUnit/ResultTests.cs
@@ -1,18 +1,27 @@
-namespace AdventureWorksDemo.Data.Tests.nUnit
+using System.Diagnostics.CodeAnalysis;
+
+namespace AdventureWorksDemo.Data.Tests.nUnit
{
- public class ResultTests
+ public class Tests
{
private FakeTimeProvider? _fakeTimeProvider;
- [SetUp]
- public void Setup()
+ [Test]
+ public void IsFailure()
{
- _fakeTimeProvider = new FakeTimeProvider();
- _fakeTimeProvider.SetUtcNow(new DateTimeOffset(new DateTime(2024, 8, 17, 12, 34, 56, DateTimeKind.Local)));
+ // Arrange
+ dynamic? expectedValue = "Hello";
+ string expectedMessage = "World";
+ // Act
+ IServiceResult actual = ServiceResult.Failure(expectedValue, expectedMessage);
+
+ Assert.That(actual.IsSuccess, Is.False);
+ Assert.That(actual.IsFailure, Is.True);
+ Assert.That(actual.Message, Is.EqualTo(expectedMessage));
}
[Test]
- public void TestResult()
+ public void IsSuccess()
{
// Arrange
dynamic? expectedValue = "Hello";
@@ -20,11 +29,16 @@ public void TestResult()
// Act
IServiceResult actual = ServiceResult.Success(expectedValue, expectedMessage);
- // Assert
- actual.IsSuccess.Should().BeTrue();
- actual.IsFailure.Should().BeFalse();
+ Assert.That(actual.IsSuccess, Is.True);
+ Assert.That(actual.IsFailure, Is.False);
+ Assert.That(actual.Message, Is.EqualTo(expectedMessage));
+ }
- actual.Message.Should().Be(expectedMessage);
+ [SetUp]
+ public void Setup()
+ {
+ _fakeTimeProvider = new FakeTimeProvider();
+ _fakeTimeProvider.SetUtcNow(new DateTimeOffset(new DateTime(2024, 8, 17, 12, 34, 56, DateTimeKind.Local)));
}
}
}
\ No newline at end of file
diff --git a/src/API/AdventureWorksDemo.Data.Tests.nUnit/Validation/ProductCategoryValidatorTests.cs b/src/API/AdventureWorksDemo.Data.Tests.nUnit/Validation/ProductCategoryValidatorTests.cs
deleted file mode 100644
index c8bc6cf..0000000
--- a/src/API/AdventureWorksDemo.Data.Tests.nUnit/Validation/ProductCategoryValidatorTests.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-using AdventureWorksDemo.Common.Tests.Extensions;
-using AdventureWorksDemo.Data.Entities;
-using AdventureWorksDemo.Data.Validation;
-
-using FluentValidation.TestHelper;
-
-namespace AdventureWorksDemo.Data.Tests.nUnit.Validation
-{
- public class ProductCategoryValidatorTests
- {
- private FakeTimeProvider _fakeTimeProvider = new();
-
- [TestCase("")]
- [TestCase("1")]
- [TestCase("12")]
- [TestCase("{{PadRight:X:51}}")]
- [Test()]
- public void NameTestError(string nameValue)
- {
- // arrange
- var uot = new ProductCategoryValidator();
- var entity = new ProductCategory()
- {
- Name = nameValue.InterpretValue(),
- };
- //act
- var result = uot.TestValidate(entity);
- //assert
- result.ShouldHaveValidationErrorFor(m => m.Name);
- }
-
- [TestCase("123")]
- [TestCase("{{PadRight:X:49}}")]
- [TestCase("{{PadRight:X:50}}")]
- [Test]
- public void NameTestGood(string nameValue)
- {
- // arrange
- var uot = new ProductCategoryValidator();
- var entity = new ProductCategory()
- {
- Name = nameValue,
- };
- //act
- var result = uot.TestValidate(entity);
- //assert
- result.ShouldNotHaveValidationErrorFor(m => m.Name);
- }
-
- [SetUp]
- public void Setup()
- {
- _fakeTimeProvider = new FakeTimeProvider();
- _fakeTimeProvider.SetUtcNow(new DateTimeOffset(new DateTime(2024, 8, 17, 12, 34, 56, DateTimeKind.Local)));
- }
- }
-}
\ No newline at end of file
diff --git a/src/API/AdventureWorksDemo.Data.Tests.nUnit/Validation/ProductDescriptionValidatorTests.cs b/src/API/AdventureWorksDemo.Data.Tests.nUnit/Validation/ProductDescriptionValidatorTests.cs
deleted file mode 100644
index 0937c8f..0000000
--- a/src/API/AdventureWorksDemo.Data.Tests.nUnit/Validation/ProductDescriptionValidatorTests.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using AdventureWorksDemo.Common.Tests.Extensions;
-using AdventureWorksDemo.Data.Entities;
-using AdventureWorksDemo.Data.Validation;
-
-using FluentValidation.TestHelper;
-
-namespace AdventureWorksDemo.Data.Tests.nUnit.Validation
-{
- public class ProductDescriptionValidatorTests
- {
- private FakeTimeProvider? _fakeTimeProvider;
-
- [TestCase("")]
- [TestCase("1")]
- [TestCase("12")]
- [TestCase("{{PadRight:X:401}}")]
- [Test()]
- public void NameTestError(string value)
- {
- // arrange
- var uot = new ProductDescriptionValidator();
- var entity = new ProductDescription()
- {
- Description = value.InterpretValue(),
- };
- //act
- var result = uot.TestValidate(entity);
- //assert
- result.ShouldHaveValidationErrorFor(m => m.Description);
- }
-
- [TestCase("123")]
- [TestCase("{{PadRight:X:400}}")]
- [Test]
- public void NameTestGood(string value)
- {
- // arrange
- var uot = new ProductDescriptionValidator();
- var entity = new ProductDescription()
- {
- Description = value,
- };
- //act
- var result = uot.TestValidate(entity);
- //assert
- result.ShouldNotHaveValidationErrorFor(m => m.Description);
- }
-
- [SetUp]
- public void Setup()
- {
- _fakeTimeProvider = new FakeTimeProvider();
- _fakeTimeProvider.SetUtcNow(new DateTimeOffset(new DateTime(2024, 8, 17, 12, 34, 56, DateTimeKind.Local)));
- }
- }
-}
\ No newline at end of file
diff --git a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/AdventureWorksDemo.Data.Tests.reqnroll.csproj b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/AdventureWorksDemo.Data.Tests.reqnroll.csproj
index 4f347c9..8117afe 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/AdventureWorksDemo.Data.Tests.reqnroll.csproj
+++ b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/AdventureWorksDemo.Data.Tests.reqnroll.csproj
@@ -12,18 +12,18 @@
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
-
-
+
+
+
@@ -33,6 +33,7 @@
+
diff --git a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/AddressService/AddressServiceFindTests.feature b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/AddressService/AddressServiceFindTests.feature
index dc9208d..ceee957 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/AddressService/AddressServiceFindTests.feature
+++ b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/AddressService/AddressServiceFindTests.feature
@@ -19,8 +19,8 @@ Scenario: FindAllAsync_1_5
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage | Count | Capacity |
- | 2 | 8 | 5 | 1 | 5 | 5 |
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 2 | 8 | 5 | 1 |
And the results are
| AddressId | ModifiedDate | Rowguid | AddressLine1 | AddressLine2 | City | CountryRegion | PostalCode | StateProvince |
| 640 | 9/1/2007 12:00:00 AM | 0e4ac5bb-be0d-4a96-a58e-064daec08e1a | 251 The Metro Center | | Wokingham | United Kingdom | RG41 1QW | England |
@@ -42,18 +42,18 @@ Scenario: FindAllAsync_1_500
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage | Count | Capacity |
- | 1 | 8 | 100 | 1 | 8 | 8 |
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 1 | 8 | 100 | 1 |
And the results are
- | AddressId | ModifiedDate | Rowguid | AddressLine1 | AddressLine2 | City | CountryRegion | PostalCode | StateProvince |
- | 640 | 9/1/2007 12:00:00 AM | 0e4ac5bb-be0d-4a96-a58e-064daec08e1a | 251 The Metro Center | | Wokingham | United Kingdom | RG41 1QW | England |
- | 652 | 9/1/2006 12:00:00 AM | 54e20963-b0e9-41cf-ab7e-d50459a3325c | Wymbush | | Milton Keynes | United Kingdom | MK8 8DF | England |
- | 669 | 12/1/2006 12:00:00 AM | 56baec2a-5cc5-4a90-bef9-ee57e82f2e69 | Internet House, 3399 Science Park | | Cambridge | United Kingdom | CB4 4BZ | England |
- | 1034 | 9/1/2007 12:00:00 AM | 300d2a6e-67b4-417b-83a9-2026818a21c6 | Oxnard Outlet | | Oxnard | United States | 93030 | California |
- | 1038 | 9/1/2007 12:00:00 AM | a86c8140-ad7d-4caa-9b40-4006bd9998e2 | 123 Camelia Avenue | | Oxnard | United States | 93030 | California |
- | 1090 | 9/1/2007 12:00:00 AM | cf3ae92a-3e66-4af0-b683-731826e89cd1 | 25130 South State Street | | Sandy | United States | 84070 | Utah |
- | 1092 | 9/1/2006 12:00:00 AM | 79cdd89c-3c91-48db-8277-46d04aad7251 | 99700 Bell Road | | Auburn | United States | 95603 | California |
- | 1111 | 9/1/2006 12:00:00 AM | 00000000-1111-2222-0000-000000000001 | Orphan Record | | Use In Delete Tests | United States | 95603 | California |
+ | AddressId | ModifiedDate | Rowguid | AddressLine1 | AddressLine2 | City | CountryRegion | PostalCode | StateProvince |
+ | 640 | 9/1/2007 12:00:00 AM | 0e4ac5bb-be0d-4a96-a58e-064daec08e1a | 251 The Metro Center | | Wokingham | United Kingdom | RG41 1QW | England |
+ | 652 | 9/1/2006 12:00:00 AM | 54e20963-b0e9-41cf-ab7e-d50459a3325c | Wymbush | | Milton Keynes | United Kingdom | MK8 8DF | England |
+ | 669 | 12/1/2006 12:00:00 AM | 56baec2a-5cc5-4a90-bef9-ee57e82f2e69 | Internet House, 3399 Science Park | | Cambridge | United Kingdom | CB4 4BZ | England |
+ | 1034 | 9/1/2007 12:00:00 AM | 300d2a6e-67b4-417b-83a9-2026818a21c6 | Oxnard Outlet | | Oxnard | United States | 93030 | California |
+ | 1038 | 9/1/2007 12:00:00 AM | a86c8140-ad7d-4caa-9b40-4006bd9998e2 | 123 Camelia Avenue | | Oxnard | United States | 93030 | California |
+ | 1090 | 9/1/2007 12:00:00 AM | cf3ae92a-3e66-4af0-b683-731826e89cd1 | 25130 South State Street | | Sandy | United States | 84070 | Utah |
+ | 1092 | 9/1/2006 12:00:00 AM | 79cdd89c-3c91-48db-8277-46d04aad7251 | 99700 Bell Road | | Auburn | United States | 95603 | California |
+ | 1111 | 9/1/2006 12:00:00 AM | 00000000-1111-2222-0000-000000000001 | Orphan Record | | Use In Delete Tests | United States | 95603 | California |
Scenario: FindAllAsync_2_5
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
@@ -66,13 +66,13 @@ Scenario: FindAllAsync_2_5
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage | Count | Capacity |
- | 2 | 8 | 5 | 2 | 3 | 4 |
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 2 | 8 | 5 | 2 |
And the results are
- | AddressId | ModifiedDate | Rowguid | AddressLine1 | AddressLine2 | City | CountryRegion | PostalCode | StateProvince |
- | 1090 | 9/1/2007 12:00:00 AM | cf3ae92a-3e66-4af0-b683-731826e89cd1 | 25130 South State Street | | Sandy | United States | 84070 | Utah |
- | 1092 | 9/1/2006 12:00:00 AM | 79cdd89c-3c91-48db-8277-46d04aad7251 | 99700 Bell Road | | Auburn | United States | 95603 | California |
- | 1111 | 9/1/2006 12:00:00 AM | 00000000-1111-2222-0000-000000000001 | Orphan Record | | Use In Delete Tests | United States | 95603 | California |
+ | AddressId | ModifiedDate | Rowguid | AddressLine1 | AddressLine2 | City | CountryRegion | PostalCode | StateProvince |
+ | 1090 | 9/1/2007 12:00:00 AM | cf3ae92a-3e66-4af0-b683-731826e89cd1 | 25130 South State Street | | Sandy | United States | 84070 | Utah |
+ | 1092 | 9/1/2006 12:00:00 AM | 79cdd89c-3c91-48db-8277-46d04aad7251 | 99700 Bell Road | | Auburn | United States | 95603 | California |
+ | 1111 | 9/1/2006 12:00:00 AM | 00000000-1111-2222-0000-000000000001 | Orphan Record | | Use In Delete Tests | United States | 95603 | California |
Scenario: FindAllAsync_2_8
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
@@ -85,8 +85,8 @@ Scenario: FindAllAsync_2_8
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage | Count | Capacity |
- | 1 | 8 | 8 | 2 | 0 | 0 |
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 1 | 8 | 8 | 2 |
And the results are
| AddressId | ModifiedDate | Rowguid | AddressLine1 | AddressLine2 | City | CountryRegion | PostalCode | StateProvince |
@@ -101,8 +101,8 @@ Scenario: FindAllAsync_20_20
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage | Count | Capacity |
- | 1 | 8 | 8 | 2 | 0 | 0 |
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 1 | 8 | 8 | 2 |
And the results are
| AddressId | ModifiedDate | Rowguid | AddressLine1 | AddressLine2 | City | CountryRegion | PostalCode | StateProvince |
@@ -117,8 +117,8 @@ Scenario: FindAllAsync_1234_5
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage | Count | Capacity |
- | 2 | 8 | 5 | 1234 | 0 | 0 |
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 2 | 8 | 5 | 1234 |
And the results are
| AddressId | ModifiedDate | Rowguid | AddressLine1 | AddressLine2 | City | CountryRegion | PostalCode | StateProvince |
@@ -130,11 +130,23 @@ Scenario: FindAllAsync_0_0
| Key | Value | TypeName |
| pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
Then the result is of type
- | Expected |
- | System.ArgumentOutOfRangeException |
- And the exception message is
- | Expected |
- | Parameter pageNumber must be positive (Parameter 'pageNumber') |
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 1 | 8 | 25 | 1 |
+ And the results are
+ | AddressId | ModifiedDate | Rowguid | AddressLine1 | AddressLine2 | City | CountryRegion | PostalCode | StateProvince |
+ | 640 | 9/1/2007 12:00:00 AM | 0e4ac5bb-be0d-4a96-a58e-064daec08e1a | 251 The Metro Center | | Wokingham | United Kingdom | RG41 1QW | England |
+ | 652 | 9/1/2006 12:00:00 AM | 54e20963-b0e9-41cf-ab7e-d50459a3325c | Wymbush | | Milton Keynes | United Kingdom | MK8 8DF | England |
+ | 669 | 12/1/2006 12:00:00 AM | 56baec2a-5cc5-4a90-bef9-ee57e82f2e69 | Internet House, 3399 Science Park | | Cambridge | United Kingdom | CB4 4BZ | England |
+ | 1034 | 9/1/2007 12:00:00 AM | 300d2a6e-67b4-417b-83a9-2026818a21c6 | Oxnard Outlet | | Oxnard | United States | 93030 | California |
+ | 1038 | 9/1/2007 12:00:00 AM | a86c8140-ad7d-4caa-9b40-4006bd9998e2 | 123 Camelia Avenue | | Oxnard | United States | 93030 | California |
+ | 1090 | 9/1/2007 12:00:00 AM | cf3ae92a-3e66-4af0-b683-731826e89cd1 | 25130 South State Street | | Sandy | United States | 84070 | Utah |
+ | 1092 | 9/1/2006 12:00:00 AM | 79cdd89c-3c91-48db-8277-46d04aad7251 | 99700 Bell Road | | Auburn | United States | 95603 | California |
+ | 1111 | 9/1/2006 12:00:00 AM | 00000000-1111-2222-0000-000000000001 | Orphan Record | | Use In Delete Tests | United States | 95603 | California |
+
Scenario: FindAllAsync_0_5
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
| PageNumber | PageSize |
@@ -143,11 +155,19 @@ Scenario: FindAllAsync_0_5
| Key | Value | TypeName |
| pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
Then the result is of type
- | Expected |
- | System.ArgumentOutOfRangeException |
- And the exception message is
- | Expected |
- | Parameter pageNumber must be positive (Parameter 'pageNumber') |
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 2 | 8 | 5 | 1 |
+ And the results are
+ | AddressId | ModifiedDate | Rowguid | AddressLine1 | AddressLine2 | City | CountryRegion | PostalCode | StateProvince |
+ | 640 | 9/1/2007 12:00:00 AM | 0e4ac5bb-be0d-4a96-a58e-064daec08e1a | 251 The Metro Center | | Wokingham | United Kingdom | RG41 1QW | England |
+ | 652 | 9/1/2006 12:00:00 AM | 54e20963-b0e9-41cf-ab7e-d50459a3325c | Wymbush | | Milton Keynes | United Kingdom | MK8 8DF | England |
+ | 669 | 12/1/2006 12:00:00 AM | 56baec2a-5cc5-4a90-bef9-ee57e82f2e69 | Internet House, 3399 Science Park | | Cambridge | United Kingdom | CB4 4BZ | England |
+ | 1034 | 9/1/2007 12:00:00 AM | 300d2a6e-67b4-417b-83a9-2026818a21c6 | Oxnard Outlet | | Oxnard | United States | 93030 | California |
+ | 1038 | 9/1/2007 12:00:00 AM | a86c8140-ad7d-4caa-9b40-4006bd9998e2 | 123 Camelia Avenue | | Oxnard | United States | 93030 | California |
+
Scenario: FindAllAsync_5_0
@@ -159,12 +179,14 @@ Scenario: FindAllAsync_5_0
| pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
Then the result is of type
| Expected |
- | System.ArgumentOutOfRangeException |
- And the exception message is
- | Expected |
- | Parameter pageSize must be positive (Parameter 'pageSize') |
-
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 1 | 8 | 25 | 5 |
+ And the results are
+ | AddressId | ModifiedDate | Rowguid | AddressLine1 | AddressLine2 | City | CountryRegion | PostalCode | StateProvince |
+
Scenario: FindAsync1090
When I call the method 'FindAsync' with the parameter values
| Key | Value | TypeName |
diff --git a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/ProductDescriptionServiceFindTests.feature b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/ProductDescriptionServiceFindTests.feature
index 686b1cc..5479e89 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/ProductDescriptionServiceFindTests.feature
+++ b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/ProductDescriptionServiceFindTests.feature
@@ -50,8 +50,8 @@ Scenario: FindAllAsync_1_5
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage | Count | Capacity |
- | 8 | 37 | 5 | 1 | 5 | 5 |
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 8 | 37 | 5 | 1 |
And the results are
| ProductDescriptionId | ModifiedDate | Rowguid | Description |
| 8 | 6/1/2007 12:00:00 AM | 8e6746e5-ad97-46e2-bd24-fcea075c3b52 | Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride. |
@@ -72,8 +72,8 @@ Scenario: FindAllAsync_1_500
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage | Count | Capacity |
- | 1 | 37 | 100 | 1 | 37 | 37 |
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 1 | 37 | 100 | 1 |
And the results are
| ProductDescriptionId | ModifiedDate | Rowguid | Description |
| 8 | 6/1/2007 12:00:00 AM | 8e6746e5-ad97-46e2-bd24-fcea075c3b52 | Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride. |
@@ -126,8 +126,8 @@ Scenario: FindAllAsync_2_5
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage | Count | Capacity |
- | 8 | 37 | 5 | 2 | 5 | 5 |
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 8 | 37 | 5 | 2 |
And the results are
| ProductDescriptionId | ModifiedDate | Rowguid | Description |
| 554 | 6/1/2007 12:00:00 AM | ddc955b2-843e-49ce-8f7b-54870f6135eb | The plush custom saddle keeps you riding all day, and there's plenty of space to add panniers and bike bags to the newly-redesigned carrier. This bike has stability when fully-loaded. |
@@ -147,8 +147,8 @@ Scenario: FindAllAsync_2_8
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage | Count | Capacity |
- | 5 | 37 | 8 | 2 | 8 | 8 |
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 5 | 37 | 8 | 2 |
And the results are
| ProductDescriptionId | ModifiedDate | Rowguid | Description |
| 630 | 6/1/2007 12:00:00 AM | 28c4682c-38b2-4b61-a2ae-bcac7c7ce29b | Wide-link design. |
@@ -171,8 +171,8 @@ Scenario: FindAllAsync_20_20
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage | Count | Capacity |
- | 5 | 37 | 8 | 2 | 8 | 8 |
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 5 | 37 | 8 | 2 |
And the results are
| ProductDescriptionId | ModifiedDate | Rowguid | Description |
| 630 | 6/1/2007 12:00:00 AM | 28c4682c-38b2-4b61-a2ae-bcac7c7ce29b | Wide-link design. |
@@ -195,8 +195,8 @@ Scenario: FindAllAsync_1234_5
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage | Count | Capacity |
- | 8 | 37 | 5 | 1234 | 0 | 0 |
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 8 | 37 | 5 | 1234 |
And the results are
| ProductDescriptionId | ModifiedDate | Rowguid | Description |
@@ -208,11 +208,40 @@ Scenario: FindAllAsync_0_0
| Key | Value | TypeName |
| pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
Then the result is of type
- | Expected |
- | System.ArgumentOutOfRangeException |
- And the exception message is
- | Expected |
- | Parameter pageNumber must be positive (Parameter 'pageNumber') |
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 2 | 37 | 25 | 1 |
+ And the results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 8 | 6/1/2007 12:00:00 AM | 8e6746e5-ad97-46e2-bd24-fcea075c3b52 | Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride. |
+ | 64 | 6/1/2007 12:00:00 AM | 7b1c4e90-85e2-4792-b47b-e0c424e2ec94 | This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road. |
+ | 128 | 3/11/2008 10:32:17.973 AM | 130709e6-8512-49b9-9f62-1f5c99152056 | Serious back-country riding. Perfect for all levels of competition. Uses the same HL Frame as the Mountain-100. |
+ | 209 | 6/1/2007 12:00:00 AM | f5ff5ffd-cb7c-4ad6-bbc9-4d250bb6e98d | Entry level adult bike; offers a comfortable ride cross-country or down the block. Quick-release hubs and rims. |
+ | 513 | 6/1/2007 12:00:00 AM | 741eae59-5e59-4dbc-9086-2633392c2582 | All-occasion value bike with our basic comfort and safety features. Offers wider, more stable tires for a ride around town or weekend trip. |
+ | 554 | 6/1/2007 12:00:00 AM | ddc955b2-843e-49ce-8f7b-54870f6135eb | The plush custom saddle keeps you riding all day, and there's plenty of space to add panniers and bike bags to the newly-redesigned carrier. This bike has stability when fully-loaded. |
+ | 594 | 6/1/2007 12:00:00 AM | 32b82c92-e545-4da0-a175-0be710b482fe | Travel in style and comfort. Designed for maximum comfort and safety. Wide gear range takes on all hills. High-tech aluminum alloy construction provides durability without added weight. |
+ | 627 | 6/1/2007 12:00:00 AM | ebf2f0a4-89f2-4d31-be48-d8fd278f3024 | All-weather brake pads; provides superior stopping by applying more surface to the rim. |
+ | 630 | 6/1/2007 12:00:00 AM | 28c4682c-38b2-4b61-a2ae-bcac7c7ce29b | Wide-link design. |
+ | 647 | 6/1/2007 12:00:00 AM | 7ad9e29f-16cf-4db0-b073-cc62d501b61a | Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps. |
+ | 661 | 6/1/2007 12:00:00 AM | d61c9d54-22c3-4563-a418-0b9dc7e03850 | Made from the same aluminum alloy as our top-of-the line HL frame, the ML features a lightweight down-tube milled to the perfect diameter for optimal strength. Women's version. |
+ | 848 | 6/1/2007 12:00:00 AM | 03acbb19-749a-48a1-b77e-5d2a48e8dc3a | Lightweight, durable, clipless pedal with adjustable tension. |
+ | 1020 | 6/1/2007 12:00:00 AM | f4c70a6b-bbe8-4774-9d75-393d3f315e9b | The LL Frame provides a safe comfortable ride, while offering superior bump absorption in a value-priced aluminum frame. |
+ | 1196 | 6/1/2007 12:00:00 AM | c65bee64-4dba-47ec-91cd-31356ba379e1 | Heavy duty, abrasion-resistant shorts feature seamless, lycra inner shorts with anti-bacterial chamois for comfort. |
+ | 1205 | 6/1/2007 12:00:00 AM | 58d86ede-0519-4263-a264-a2b5b01a6c7b | Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets. |
+ | 1208 | 6/1/2007 12:00:00 AM | 9f436663-525d-4cc2-85ba-47d20bcea0ec | Thin, lightweight and durable with cuffs that stay up. |
+ | 1210 | 6/1/2007 12:00:00 AM | 66f84b21-1a43-49d3-8883-09cdb77fffef | Traditional style with a flip-up brim; one-size fits all. |
+ | 1211 | 6/1/2007 12:00:00 AM | 12f60253-f8e1-4f76-8142-6232396b8f17 | Unisex long-sleeve AWC logo microfiber cycling jersey |
+ | 1487 | 6/1/2007 12:00:00 AM | 5c1dab3a-4b31-4d9d-a14f-3cb61949b79b | Adapt� � tous les usages, sur route ou tout-terrain. Pour toutes les bourses. Changement de braquet en douceur et conduite confortable. |
+ | 1488 | 6/1/2007 12:00:00 AM | 79065ec8-2080-4120-a4ea-bfa7ea1f1f9d | Ce v�lo offre un excellent rapport qualit�-prix. Vif et facile � man�uvrer, il se conduit en toute tranquillit� sur les chemins et les sentiers. |
+ | 1490 | 3/11/2008 10:32:17.973 AM | 2b6fa2a7-4815-47b6-a6bc-d6aec23b85cc | Conduite sur terrains tr�s accident�s. Id�al pour tous les niveaux de comp�tition. Utilise le m�me cadre HL que le Montain-100. |
+ | 1493 | 6/1/2007 12:00:00 AM | 7943455f-3fbe-44c0-9ac2-7ee642d3944b | V�lo d'adulte d'entr�e de gamme�; permet une conduite confortable en ville ou sur les chemins de campagne. Moyeux et rayons � blocage rapide. |
+ | 1502 | 6/1/2007 12:00:00 AM | e5288050-bc5b-45cc-8849-c7d4af2fe2b6 | V�lo de qualit� pour tous usages, dot� d'un bon niveau de confort et de s�curit�. Pr�sente des pneus plus larges et plus stables pour les sorties en ville ou les randonn�es du week-end. |
+ | 1503 | 6/1/2007 12:00:00 AM | 28b132c3-108c-412d-9918-a8c9297dfb73 | La selle rembourr�e offre un confort optimal. Le porte-bagages nouvellement remani� offre diverses possibilit�s d'ajout de paniers ou de sacoches. Ce v�lo reste parfaitement stable une fois charg�. |
+ | 1504 | 6/1/2007 12:00:00 AM | e3bac4a6-220c-4e5e-8261-51e08906c0e8 | Voyagez confortablement et avec �l�gance. Confort et s�curit� maximum. Large �ventail de vitesses pour gravir toutes les c�tes. Sa fabrication en alliage d'aluminium haute technologie est synonyme de robustesse, sans ajout de poids. |
+
Scenario: FindAllAsync_0_5
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
| PageNumber | PageSize |
@@ -221,12 +250,18 @@ Scenario: FindAllAsync_0_5
| Key | Value | TypeName |
| pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
Then the result is of type
- | Expected |
- | System.ArgumentOutOfRangeException |
- And the exception message is
- | Expected |
- | Parameter pageNumber must be positive (Parameter 'pageNumber') |
-
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 8 | 37 | 5 | 1 |
+ And the results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 8 | 6/1/2007 12:00:00 AM | 8e6746e5-ad97-46e2-bd24-fcea075c3b52 | Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride. |
+ | 64 | 6/1/2007 12:00:00 AM | 7b1c4e90-85e2-4792-b47b-e0c424e2ec94 | This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road. |
+ | 128 | 3/11/2008 10:32:17.973 AM | 130709e6-8512-49b9-9f62-1f5c99152056 | Serious back-country riding. Perfect for all levels of competition. Uses the same HL Frame as the Mountain-100. |
+ | 209 | 6/1/2007 12:00:00 AM | f5ff5ffd-cb7c-4ad6-bbc9-4d250bb6e98d | Entry level adult bike; offers a comfortable ride cross-country or down the block. Quick-release hubs and rims. |
+ | 513 | 6/1/2007 12:00:00 AM | 741eae59-5e59-4dbc-9086-2633392c2582 | All-occasion value bike with our basic comfort and safety features. Offers wider, more stable tires for a ride around town or weekend trip. |
Scenario: FindAllAsync_5_0
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
@@ -236,8 +271,11 @@ Scenario: FindAllAsync_5_0
| Key | Value | TypeName |
| pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
Then the result is of type
- | Expected |
- | System.ArgumentOutOfRangeException |
- And the exception message is
- | Expected |
- | Parameter pageSize must be positive (Parameter 'pageSize') |
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 2 | 37 | 25 | 5 |
+ And the results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+
\ No newline at end of file
diff --git a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceAddTests.feature.cs b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceAddTests.feature.cs
index c611f13..9d10270 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceAddTests.feature.cs
+++ b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceAddTests.feature.cs
@@ -131,81 +131,81 @@ public async System.Threading.Tasks.Task AddAsyncNoParent()
#line 13
await testRunner.GivenAsync("I reset the database after the scenario", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given ");
#line hidden
- global::Reqnroll.Table table302 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table308 = new global::Reqnroll.Table(new string[] {
"Name",
"ParentProductCategoryId",
"Rowguid"});
- table302.AddRow(new string[] {
+ table308.AddRow(new string[] {
"PingPong",
"",
"00000000-1111-0000-0000-000000000002"});
#line 14
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table302, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table308, "When ");
#line hidden
- global::Reqnroll.Table table303 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table309 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table303.AddRow(new string[] {
+ table309.AddRow(new string[] {
"model",
"{{model}}",
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 17
- await testRunner.AndAsync("I call the method \'AddAsync\' with the parameter values", ((string)(null)), table303, "And ");
+ await testRunner.AndAsync("I call the method \'AddAsync\' with the parameter values", ((string)(null)), table309, "And ");
#line hidden
- global::Reqnroll.Table table304 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table310 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table304.AddRow(new string[] {
+ table310.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 20
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table304, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table310, "Then ");
#line hidden
- global::Reqnroll.Table table305 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table311 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table305.AddRow(new string[] {
+ table311.AddRow(new string[] {
"False",
"True",
""});
#line 23
- await testRunner.AndAsync("the result is", ((string)(null)), table305, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table311, "And ");
#line hidden
- global::Reqnroll.Table table306 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table312 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table306.AddRow(new string[] {
+ table312.AddRow(new string[] {
"5001",
"",
"PingPong",
"5/24/2024 12:34:56 PM",
"00000000-1111-0000-0000-000000000002"});
#line 26
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table306, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table312, "And ");
#line hidden
- global::Reqnroll.Table table307 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table313 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table307.AddRow(new string[] {
+ table313.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table307.AddRow(new string[] {
+ table313.AddRow(new string[] {
"42",
"",
"Record to Delete",
"6/1/2005 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-000000000001"});
- table307.AddRow(new string[] {
+ table313.AddRow(new string[] {
"5001",
"",
"PingPong",
@@ -213,7 +213,7 @@ public async System.Threading.Tasks.Task AddAsyncNoParent()
"00000000-1111-0000-0000-000000000002"});
#line 29
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table307, "And ");
+ "", ((string)(null)), table313, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -243,75 +243,75 @@ public async System.Threading.Tasks.Task AddAsyncNoParentShortName()
#line 36
await testRunner.GivenAsync("I reset the database after the scenario", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given ");
#line hidden
- global::Reqnroll.Table table308 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table314 = new global::Reqnroll.Table(new string[] {
"Name",
"ParentProductCategoryId",
"Rowguid"});
- table308.AddRow(new string[] {
+ table314.AddRow(new string[] {
"Hi",
"",
"00000000-1111-0000-0000-000000000002"});
#line 37
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table308, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table314, "When ");
#line hidden
- global::Reqnroll.Table table309 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table315 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table309.AddRow(new string[] {
+ table315.AddRow(new string[] {
"model",
"{{model}}",
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 40
- await testRunner.AndAsync("I call the method \'AddAsync\' with the parameter values", ((string)(null)), table309, "And ");
+ await testRunner.AndAsync("I call the method \'AddAsync\' with the parameter values", ((string)(null)), table315, "And ");
#line hidden
- global::Reqnroll.Table table310 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table316 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table310.AddRow(new string[] {
+ table316.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 43
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table310, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table316, "Then ");
#line hidden
- global::Reqnroll.Table table311 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table317 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table311.AddRow(new string[] {
+ table317.AddRow(new string[] {
"True",
"False",
"\'Name\' must be between 3 and 50 characters. You entered 2 characters."});
#line 46
- await testRunner.AndAsync("the result is", ((string)(null)), table311, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table317, "And ");
#line hidden
- global::Reqnroll.Table table312 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table318 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table312.AddRow(new string[] {
+ table318.AddRow(new string[] {
"0",
"",
"Hi",
"1/1/0001 12:00:00 AM",
"00000000-1111-0000-0000-000000000002"});
#line 50
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table312, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table318, "And ");
#line hidden
- global::Reqnroll.Table table313 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table319 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table313.AddRow(new string[] {
+ table319.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table313.AddRow(new string[] {
+ table319.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -319,7 +319,7 @@ public async System.Threading.Tasks.Task AddAsyncNoParentShortName()
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 54
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table313, "And ");
+ "", ((string)(null)), table319, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -349,81 +349,81 @@ public async System.Threading.Tasks.Task AddAsyncParent()
#line 60
await testRunner.GivenAsync("I reset the database after the scenario", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given ");
#line hidden
- global::Reqnroll.Table table314 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table320 = new global::Reqnroll.Table(new string[] {
"Name",
"ParentProductCategoryId",
"Rowguid"});
- table314.AddRow(new string[] {
+ table320.AddRow(new string[] {
"PingPong",
"42",
"00000000-1111-0000-0000-000000000002"});
#line 61
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table314, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table320, "When ");
#line hidden
- global::Reqnroll.Table table315 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table321 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table315.AddRow(new string[] {
+ table321.AddRow(new string[] {
"model",
"{{model}}",
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 64
- await testRunner.AndAsync("I call the method \'AddAsync\' with the parameter values", ((string)(null)), table315, "And ");
+ await testRunner.AndAsync("I call the method \'AddAsync\' with the parameter values", ((string)(null)), table321, "And ");
#line hidden
- global::Reqnroll.Table table316 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table322 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table316.AddRow(new string[] {
+ table322.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 67
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table316, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table322, "Then ");
#line hidden
- global::Reqnroll.Table table317 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table323 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table317.AddRow(new string[] {
+ table323.AddRow(new string[] {
"False",
"True",
""});
#line 70
- await testRunner.AndAsync("the result is", ((string)(null)), table317, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table323, "And ");
#line hidden
- global::Reqnroll.Table table318 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table324 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table318.AddRow(new string[] {
+ table324.AddRow(new string[] {
"5001",
"42",
"PingPong",
"5/24/2024 12:34:56 PM",
"00000000-1111-0000-0000-000000000002"});
#line 73
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table318, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table324, "And ");
#line hidden
- global::Reqnroll.Table table319 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table325 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table319.AddRow(new string[] {
+ table325.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table319.AddRow(new string[] {
+ table325.AddRow(new string[] {
"42",
"",
"Record to Delete",
"6/1/2005 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-000000000001"});
- table319.AddRow(new string[] {
+ table325.AddRow(new string[] {
"5001",
"42",
"PingPong",
@@ -431,7 +431,7 @@ public async System.Threading.Tasks.Task AddAsyncParent()
"00000000-1111-0000-0000-000000000002"});
#line 76
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table319, "And ");
+ "", ((string)(null)), table325, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -461,75 +461,75 @@ public async System.Threading.Tasks.Task AddAsyncParentShortName()
#line 83
await testRunner.GivenAsync("I reset the database after the scenario", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given ");
#line hidden
- global::Reqnroll.Table table320 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table326 = new global::Reqnroll.Table(new string[] {
"Name",
"ParentProductCategoryId",
"Rowguid"});
- table320.AddRow(new string[] {
+ table326.AddRow(new string[] {
"Hi",
"42",
"00000000-1111-0000-0000-000000000002"});
#line 84
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table320, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table326, "When ");
#line hidden
- global::Reqnroll.Table table321 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table327 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table321.AddRow(new string[] {
+ table327.AddRow(new string[] {
"model",
"{{model}}",
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 87
- await testRunner.AndAsync("I call the method \'AddAsync\' with the parameter values", ((string)(null)), table321, "And ");
+ await testRunner.AndAsync("I call the method \'AddAsync\' with the parameter values", ((string)(null)), table327, "And ");
#line hidden
- global::Reqnroll.Table table322 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table328 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table322.AddRow(new string[] {
+ table328.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 90
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table322, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table328, "Then ");
#line hidden
- global::Reqnroll.Table table323 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table329 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table323.AddRow(new string[] {
+ table329.AddRow(new string[] {
"True",
"False",
"\'Name\' must be between 3 and 50 characters. You entered 2 characters."});
#line 93
- await testRunner.AndAsync("the result is", ((string)(null)), table323, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table329, "And ");
#line hidden
- global::Reqnroll.Table table324 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table330 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table324.AddRow(new string[] {
+ table330.AddRow(new string[] {
"0",
"42",
"Hi",
"1/1/0001 12:00:00 AM",
"00000000-1111-0000-0000-000000000002"});
#line 97
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table324, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table330, "And ");
#line hidden
- global::Reqnroll.Table table325 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table331 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table325.AddRow(new string[] {
+ table331.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table325.AddRow(new string[] {
+ table331.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -537,7 +537,7 @@ public async System.Threading.Tasks.Task AddAsyncParentShortName()
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 100
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table325, "And ");
+ "", ((string)(null)), table331, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -567,131 +567,131 @@ public async System.Threading.Tasks.Task AddBatchAsync()
#line 106
await testRunner.GivenAsync("I reset the database after the scenario", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given ");
#line hidden
- global::Reqnroll.Table table326 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table332 = new global::Reqnroll.Table(new string[] {
"Name",
"ParentProductCategoryId",
"Rowguid"});
- table326.AddRow(new string[] {
+ table332.AddRow(new string[] {
"How",
"4",
"00000000-1111-1111-0000-000000000001"});
- table326.AddRow(new string[] {
+ table332.AddRow(new string[] {
"Now",
"5",
"00000000-1111-1111-0000-000000000002"});
- table326.AddRow(new string[] {
+ table332.AddRow(new string[] {
"Brown",
"41",
"00000000-1111-1111-0000-000000000003"});
- table326.AddRow(new string[] {
+ table332.AddRow(new string[] {
"Cow",
"",
"00000000-1111-1111-0000-000000000004"});
#line 107
await testRunner.WhenAsync("I populate a list of the model \'AdventureWorksDemo.Data.Models.ProductCategoryMod" +
- "el\'", ((string)(null)), table326, "When ");
+ "el\'", ((string)(null)), table332, "When ");
#line hidden
- global::Reqnroll.Table table327 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table333 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table327.AddRow(new string[] {
+ table333.AddRow(new string[] {
"model",
"{{ListOfObjects}}",
"System.Collections.Generic.IEnumerable"});
#line 113
- await testRunner.AndAsync("I call the method \'AddBatchAsync\' with the parameter values", ((string)(null)), table327, "And ");
+ await testRunner.AndAsync("I call the method \'AddBatchAsync\' with the parameter values", ((string)(null)), table333, "And ");
#line hidden
- global::Reqnroll.Table table328 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table334 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table328.AddRow(new string[] {
+ table334.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 116
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table328, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table334, "Then ");
#line hidden
- global::Reqnroll.Table table329 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table335 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table329.AddRow(new string[] {
+ table335.AddRow(new string[] {
"false",
"true",
""});
#line 119
- await testRunner.AndAsync("the result is", ((string)(null)), table329, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table335, "And ");
#line hidden
- global::Reqnroll.Table table330 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table336 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table330.AddRow(new string[] {
+ table336.AddRow(new string[] {
"5001",
"4",
"How",
"5/24/2024 12:34:56 PM",
"00000000-1111-1111-0000-000000000001"});
- table330.AddRow(new string[] {
+ table336.AddRow(new string[] {
"5002",
"5",
"Now",
"5/24/2024 12:34:56 PM",
"00000000-1111-1111-0000-000000000002"});
- table330.AddRow(new string[] {
+ table336.AddRow(new string[] {
"5003",
"41",
"Brown",
"5/24/2024 12:34:56 PM",
"00000000-1111-1111-0000-000000000003"});
- table330.AddRow(new string[] {
+ table336.AddRow(new string[] {
"5004",
"",
"Cow",
"5/24/2024 12:34:56 PM",
"00000000-1111-1111-0000-000000000004"});
#line 123
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table330, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table336, "And ");
#line hidden
- global::Reqnroll.Table table331 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table337 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table331.AddRow(new string[] {
+ table337.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table331.AddRow(new string[] {
+ table337.AddRow(new string[] {
"42",
"",
"Record to Delete",
"6/1/2005 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-000000000001"});
- table331.AddRow(new string[] {
+ table337.AddRow(new string[] {
"5001",
"4",
"How",
"5/24/2024 12:34:56 PM",
"00000000-1111-1111-0000-000000000001"});
- table331.AddRow(new string[] {
+ table337.AddRow(new string[] {
"5002",
"5",
"Now",
"5/24/2024 12:34:56 PM",
"00000000-1111-1111-0000-000000000002"});
- table331.AddRow(new string[] {
+ table337.AddRow(new string[] {
"5003",
"41",
"Brown",
"5/24/2024 12:34:56 PM",
"00000000-1111-1111-0000-000000000003"});
- table331.AddRow(new string[] {
+ table337.AddRow(new string[] {
"5004",
"",
"Cow",
@@ -699,7 +699,7 @@ await testRunner.WhenAsync("I populate a list of the model \'AdventureWorksDemo.
"00000000-1111-1111-0000-000000000004"});
#line 130
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table331, "And ");
+ "", ((string)(null)), table337, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -729,114 +729,114 @@ public async System.Threading.Tasks.Task AddBatchAsync2ShortName()
#line 140
await testRunner.GivenAsync("I reset the database after the scenario", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given ");
#line hidden
- global::Reqnroll.Table table332 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table338 = new global::Reqnroll.Table(new string[] {
"Name",
"ParentProductCategoryId",
"Rowguid"});
- table332.AddRow(new string[] {
+ table338.AddRow(new string[] {
"Hi",
"4",
"00000000-1111-1111-0000-000000000001"});
- table332.AddRow(new string[] {
+ table338.AddRow(new string[] {
"Now",
"5",
"00000000-1111-1111-0000-000000000002"});
- table332.AddRow(new string[] {
+ table338.AddRow(new string[] {
"Brown",
"41",
"00000000-1111-1111-0000-000000000003"});
- table332.AddRow(new string[] {
+ table338.AddRow(new string[] {
"It",
"",
"00000000-1111-1111-0000-000000000004"});
#line 141
await testRunner.WhenAsync("I populate a list of the model \'AdventureWorksDemo.Data.Models.ProductCategoryMod" +
- "el\'", ((string)(null)), table332, "When ");
+ "el\'", ((string)(null)), table338, "When ");
#line hidden
- global::Reqnroll.Table table333 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table339 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table333.AddRow(new string[] {
+ table339.AddRow(new string[] {
"model",
"{{ListOfObjects}}",
"System.Collections.Generic.IEnumerable"});
#line 147
- await testRunner.AndAsync("I call the method \'AddBatchAsync\' with the parameter values", ((string)(null)), table333, "And ");
+ await testRunner.AndAsync("I call the method \'AddBatchAsync\' with the parameter values", ((string)(null)), table339, "And ");
#line hidden
- global::Reqnroll.Table table334 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table340 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table334.AddRow(new string[] {
+ table340.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 150
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table334, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table340, "Then ");
#line hidden
- global::Reqnroll.Table table335 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table341 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess"});
- table335.AddRow(new string[] {
+ table341.AddRow(new string[] {
"True",
"False"});
#line 153
- await testRunner.AndAsync("the result is", ((string)(null)), table335, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table341, "And ");
#line hidden
- global::Reqnroll.Table table336 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table342 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table336.AddRow(new string[] {
+ table342.AddRow(new string[] {
"\'Name\' must be between 3 and 50 characters. You entered 2 characters."});
- table336.AddRow(new string[] {
+ table342.AddRow(new string[] {
"\'Name\' must be between 3 and 50 characters. You entered 2 characters."});
#line 156
- await testRunner.AndAsync("the results property \'Message\' contains", ((string)(null)), table336, "And ");
+ await testRunner.AndAsync("the results property \'Message\' contains", ((string)(null)), table342, "And ");
#line hidden
- global::Reqnroll.Table table337 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table343 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table337.AddRow(new string[] {
+ table343.AddRow(new string[] {
"0",
"4",
"Hi",
"1/1/0001 12:00:00 AM",
"00000000-1111-1111-0000-000000000001"});
- table337.AddRow(new string[] {
+ table343.AddRow(new string[] {
"0",
"5",
"Now",
"1/1/0001 12:00:00 AM",
"00000000-1111-1111-0000-000000000002"});
- table337.AddRow(new string[] {
+ table343.AddRow(new string[] {
"0",
"41",
"Brown",
"1/1/0001 12:00:00 AM",
"00000000-1111-1111-0000-000000000003"});
- table337.AddRow(new string[] {
+ table343.AddRow(new string[] {
"0",
"",
"It",
"1/1/0001 12:00:00 AM",
"00000000-1111-1111-0000-000000000004"});
#line 160
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table337, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table343, "And ");
#line hidden
- global::Reqnroll.Table table338 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table344 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table338.AddRow(new string[] {
+ table344.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table338.AddRow(new string[] {
+ table344.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -844,7 +844,7 @@ await testRunner.WhenAsync("I populate a list of the model \'AdventureWorksDemo.
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 167
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table338, "And ");
+ "", ((string)(null)), table344, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
diff --git a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceDeleteTests.feature.cs b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceDeleteTests.feature.cs
index 028357c..0f06e0c 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceDeleteTests.feature.cs
+++ b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceDeleteTests.feature.cs
@@ -128,57 +128,57 @@ public async System.Threading.Tasks.Task DeleteAsync1234()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table339 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table345 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName",
"ModifiedDate"});
- table339.AddRow(new string[] {
+ table345.AddRow(new string[] {
"productCategoryId",
"1234",
"int",
"21 Apr 2024 12:34:56"});
#line 14
- await testRunner.WhenAsync("I call the method \'DeleteAsync\' with the parameter values", ((string)(null)), table339, "When ");
+ await testRunner.WhenAsync("I call the method \'DeleteAsync\' with the parameter values", ((string)(null)), table345, "When ");
#line hidden
- global::Reqnroll.Table table340 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table346 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table340.AddRow(new string[] {
+ table346.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 17
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table340, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table346, "Then ");
#line hidden
- global::Reqnroll.Table table341 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table347 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table341.AddRow(new string[] {
+ table347.AddRow(new string[] {
"True",
"False",
"Unable to find record to delete!"});
#line 20
- await testRunner.AndAsync("the result is", ((string)(null)), table341, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table347, "And ");
#line hidden
- global::Reqnroll.Table table342 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table348 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table342.AddRow(new string[] {
+ table348.AddRow(new string[] {
"False"});
#line 24
- await testRunner.AndAsync("the ServiceResult is of type \'System.Boolean\' with the value", ((string)(null)), table342, "And ");
+ await testRunner.AndAsync("the ServiceResult is of type \'System.Boolean\' with the value", ((string)(null)), table348, "And ");
#line hidden
- global::Reqnroll.Table table343 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table349 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table343.AddRow(new string[] {
+ table349.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table343.AddRow(new string[] {
+ table349.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -186,7 +186,7 @@ public async System.Threading.Tasks.Task DeleteAsync1234()
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 27
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table343, "And ");
+ "", ((string)(null)), table349, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -216,49 +216,49 @@ public async System.Threading.Tasks.Task DeleteAsync42()
#line 36
await testRunner.GivenAsync("I reset the database after the scenario", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given ");
#line hidden
- global::Reqnroll.Table table344 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table350 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table344.AddRow(new string[] {
+ table350.AddRow(new string[] {
"productCategoryId",
"42",
"int"});
#line 37
- await testRunner.WhenAsync("I call the method \'DeleteAsync\' with the parameter values", ((string)(null)), table344, "When ");
+ await testRunner.WhenAsync("I call the method \'DeleteAsync\' with the parameter values", ((string)(null)), table350, "When ");
#line hidden
- global::Reqnroll.Table table345 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table351 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table345.AddRow(new string[] {
+ table351.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 40
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table345, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table351, "Then ");
#line hidden
- global::Reqnroll.Table table346 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table352 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table346.AddRow(new string[] {
+ table352.AddRow(new string[] {
"False",
"True",
""});
#line 43
- await testRunner.AndAsync("the result is", ((string)(null)), table346, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table352, "And ");
#line hidden
- global::Reqnroll.Table table347 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table353 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table347.AddRow(new string[] {
+ table353.AddRow(new string[] {
"True"});
#line 46
- await testRunner.AndAsync("the ServiceResult is of type \'System.Boolean\' with the value", ((string)(null)), table347, "And ");
+ await testRunner.AndAsync("the ServiceResult is of type \'System.Boolean\' with the value", ((string)(null)), table353, "And ");
#line hidden
- global::Reqnroll.Table table348 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table354 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table348.AddRow(new string[] {
+ table354.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
@@ -266,7 +266,7 @@ public async System.Threading.Tasks.Task DeleteAsync42()
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
#line 49
await testRunner.ThenAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table348, "Then ");
+ "", ((string)(null)), table354, "Then ");
#line hidden
}
await this.ScenarioCleanupAsync();
diff --git a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceFindTests.feature b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceFindTests.feature
index 4d3db09..b871934 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceFindTests.feature
+++ b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceFindTests.feature
@@ -50,8 +50,8 @@ Scenario: FindAllAsync_1_5
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage | Count | Capacity |
- | 9 | 42 | 5 | 1 | 5 | 5 |
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 9 | 42 | 5 | 1 |
And the results are
| ModifiedDate | Name | ParentProductCategoryId | ProductCategoryId | Rowguid |
| 6/1/2002 12:00:00 AM | Accessories | | 4 | 2be3be36-d9a2-4eee-b593-ed895d97c2a6 |
@@ -71,8 +71,8 @@ Scenario: FindAllAsync_1_500
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage | Count | Capacity |
- | 1 | 42 | 100 | 1 | 42 | 42 |
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 1 | 42 | 100 | 1 |
And the results are
| ProductCategoryId | ParentProductCategoryId | Name | ModifiedDate | Rowguid |
| 1 | | Bikes | 6/1/2002 12:00:00 AM | cfbda25c-df71-47a7-b81b-64ee161aa37c |
@@ -128,8 +128,8 @@ Scenario: FindAllAsync_2_5
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage | Count | Capacity |
- | 9 | 42 | 5 | 2 | 5 | 5 |
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 9 | 42 | 5 | 2 |
And the results are
| ModifiedDate | Name | ParentProductCategoryId | ProductCategoryId | Rowguid |
| 6/1/2002 12:00:00 AM | Road Bikes | 1 | 6 | 000310c0-bcc8-42c4-b0c3-45ae611af06b |
@@ -149,8 +149,8 @@ Scenario: FindAllAsync_2_8
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage | Count | Capacity |
- | 6 | 42 | 8 | 2 | 8 | 8 |
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 6 | 42 | 8 | 2 |
And the results are
| ModifiedDate | Name | ParentProductCategoryId | ProductCategoryId | Rowguid |
| 6/1/2002 12:00:00 AM | Bottom Brackets | 2 | 9 | a9e54089-8a1e-4cf5-8646-e3801f685934 |
@@ -173,8 +173,8 @@ Scenario: FindAllAsync_1234_5
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage | Count | Capacity |
- | 9 | 42 | 5 | 1234 | 0 | 0 |
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 9 | 42 | 5 | 1234 |
And the results are
| ModifiedDate | Name | ParentProductCategoryId | ProductCategoryId | Rowguid |
@@ -186,11 +186,19 @@ Scenario: FindAllAsync_0_5
| Key | Value | TypeName |
| pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
Then the result is of type
- | Expected |
- | System.ArgumentOutOfRangeException |
- And the exception message is
- | Expected |
- | Parameter pageNumber must be positive (Parameter 'pageNumber') |
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 9 | 42 | 5 | 1 |
+ And the results are
+ | ModifiedDate | Name | ParentProductCategoryId | ProductCategoryId | Rowguid |
+ | 6/1/2002 12:00:00 AM | Bikes | | 1 | cfbda25c-df71-47a7-b81b-64ee161aa37c |
+ | 6/1/2002 12:00:00 AM | Components | | 2 | c657828d-d808-4aba-91a3-af2ce02300e9 |
+ | 6/1/2002 12:00:00 AM | Clothing | | 3 | 10a7c342-ca82-48d4-8a38-46a2eb089b74 |
+ | 6/1/2002 12:00:00 AM | Accessories | | 4 | 2be3be36-d9a2-4eee-b593-ed895d97c2a6 |
+ | 6/1/2002 12:00:00 AM | Mountain Bikes | 1 | 5 | 2d364ade-264a-433c-b092-4fcbf3804e01 |
Scenario: FindAllAsync_0_0
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
@@ -200,11 +208,39 @@ Scenario: FindAllAsync_0_0
| Key | Value | TypeName |
| pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
Then the result is of type
- | Expected |
- | System.ArgumentOutOfRangeException |
- And the exception message is
- | Expected |
- | Parameter pageNumber must be positive (Parameter 'pageNumber') |
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 2 | 42 | 25 | 1 |
+ And the results are
+ | ModifiedDate | Name | ParentProductCategoryId | ProductCategoryId | Rowguid |
+ | 6/1/2002 12:00:00 AM | Bikes | | 1 | cfbda25c-df71-47a7-b81b-64ee161aa37c |
+ | 6/1/2002 12:00:00 AM | Components | | 2 | c657828d-d808-4aba-91a3-af2ce02300e9 |
+ | 6/1/2002 12:00:00 AM | Clothing | | 3 | 10a7c342-ca82-48d4-8a38-46a2eb089b74 |
+ | 6/1/2002 12:00:00 AM | Accessories | | 4 | 2be3be36-d9a2-4eee-b593-ed895d97c2a6 |
+ | 6/1/2002 12:00:00 AM | Mountain Bikes | 1 | 5 | 2d364ade-264a-433c-b092-4fcbf3804e01 |
+ | 6/1/2002 12:00:00 AM | Road Bikes | 1 | 6 | 000310c0-bcc8-42c4-b0c3-45ae611af06b |
+ | 6/1/2002 12:00:00 AM | Touring Bikes | 1 | 7 | 02c5061d-ecdc-4274-b5f1-e91d76bc3f37 |
+ | 6/1/2002 12:00:00 AM | Handlebars | 2 | 8 | 3ef2c725-7135-4c85-9ae6-ae9a3bdd9283 |
+ | 6/1/2002 12:00:00 AM | Bottom Brackets | 2 | 9 | a9e54089-8a1e-4cf5-8646-e3801f685934 |
+ | 6/1/2002 12:00:00 AM | Brakes | 2 | 10 | d43ba4a3-ef0d-426b-90eb-4be4547dd30c |
+ | 6/1/2002 12:00:00 AM | Chains | 2 | 11 | e93a7231-f16c-4b0f-8c41-c73fdec62da0 |
+ | 6/1/2002 12:00:00 AM | Cranksets | 2 | 12 | 4f644521-422b-4f19-974a-e3df6102567e |
+ | 6/1/2002 12:00:00 AM | Derailleurs | 2 | 13 | 1830d70c-aa2a-40c0-a271-5ba86f38f8bf |
+ | 6/1/2002 12:00:00 AM | Forks | 2 | 14 | b5f9ba42-b69b-4fdd-b2ec-57fb7b42e3cf |
+ | 6/1/2002 12:00:00 AM | Headsets | 2 | 15 | 7c782bbe-5a16-495a-aa50-10afe5a84af2 |
+ | 6/1/2002 12:00:00 AM | Mountain Frames | 2 | 16 | 61b21b65-e16a-4be7-9300-4d8e9db861be |
+ | 6/1/2002 12:00:00 AM | Pedals | 2 | 17 | 6d24ac07-7a84-4849-864a-865a14125bc9 |
+ | 6/1/2002 12:00:00 AM | Road Frames | 2 | 18 | 5515f857-075b-4f9a-87b7-43b4997077b3 |
+ | 6/1/2002 12:00:00 AM | Saddles | 2 | 19 | 049fffa3-9d30-46df-82f7-f20730ec02b3 |
+ | 6/1/2002 12:00:00 AM | Touring Frames | 2 | 20 | d2e3f1a8-56c4-4f36-b29d-5659fc0d2789 |
+ | 6/1/2002 12:00:00 AM | Wheels | 2 | 21 | 43521287-4b0b-438e-b80e-d82d9ad7c9f0 |
+ | 6/1/2002 12:00:00 AM | Bib-Shorts | 3 | 22 | 67b58d2b-5798-4a90-8c6c-5ddacf057171 |
+ | 6/1/2002 12:00:00 AM | Caps | 3 | 23 | 430dd6a8-a755-4b23-bb05-52520107da5f |
+ | 6/1/2002 12:00:00 AM | Gloves | 3 | 24 | 92d5657b-0032-4e49-bad5-41a441a70942 |
+ | 6/1/2002 12:00:00 AM | Jerseys | 3 | 25 | 09e91437-ba4f-4b1a-8215-74184fd95db8 |
Scenario: FindAllAsync_5_0
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
@@ -214,8 +250,11 @@ Scenario: FindAllAsync_5_0
| Key | Value | TypeName |
| pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
Then the result is of type
- | Expected |
- | System.ArgumentOutOfRangeException |
- And the exception message is
- | Expected |
- | Parameter pageSize must be positive (Parameter 'pageSize') |
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 2 | 42 | 25 | 5 |
+ And the results are
+ | ModifiedDate | Name | ParentProductCategoryId | ProductCategoryId | Rowguid |
diff --git a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceFindTests.feature.cs b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceFindTests.feature.cs
index 448f68a..97a4a8c 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceFindTests.feature.cs
+++ b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceFindTests.feature.cs
@@ -126,38 +126,38 @@ public async System.Threading.Tasks.Task FindAsync01()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table349 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table355 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table349.AddRow(new string[] {
+ table355.AddRow(new string[] {
"productCategoryId",
"1",
"int"});
#line 11
- await testRunner.WhenAsync("I call the method \'FindAsync\' with the parameter values", ((string)(null)), table349, "When ");
+ await testRunner.WhenAsync("I call the method \'FindAsync\' with the parameter values", ((string)(null)), table355, "When ");
#line hidden
- global::Reqnroll.Table table350 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table356 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table350.AddRow(new string[] {
+ table356.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 14
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table350, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table356, "Then ");
#line hidden
- global::Reqnroll.Table table351 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table357 = new global::Reqnroll.Table(new string[] {
"ModifiedDate",
"Name",
"ParentProductCategoryId",
"ProductCategoryId",
"Rowguid"});
- table351.AddRow(new string[] {
+ table357.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Bikes",
"",
"1",
"cfbda25c-df71-47a7-b81b-64ee161aa37c"});
#line 17
- await testRunner.AndAsync("the result is", ((string)(null)), table351, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table357, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -184,38 +184,38 @@ public async System.Threading.Tasks.Task FindAsync04()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table352 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table358 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table352.AddRow(new string[] {
+ table358.AddRow(new string[] {
"productCategoryId",
"4",
"int"});
#line 22
- await testRunner.WhenAsync("I call the method \'FindAsync\' with the parameter values", ((string)(null)), table352, "When ");
+ await testRunner.WhenAsync("I call the method \'FindAsync\' with the parameter values", ((string)(null)), table358, "When ");
#line hidden
- global::Reqnroll.Table table353 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table359 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table353.AddRow(new string[] {
+ table359.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 25
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table353, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table359, "Then ");
#line hidden
- global::Reqnroll.Table table354 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table360 = new global::Reqnroll.Table(new string[] {
"ModifiedDate",
"Name",
"ParentProductCategoryId",
"ProductCategoryId",
"Rowguid"});
- table354.AddRow(new string[] {
+ table360.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Accessories",
"",
"4",
"2be3be36-d9a2-4eee-b593-ed895d97c2a6"});
#line 28
- await testRunner.AndAsync("the result is", ((string)(null)), table354, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table360, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -242,23 +242,23 @@ public async System.Threading.Tasks.Task FindAsync1234()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table355 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table361 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table355.AddRow(new string[] {
+ table361.AddRow(new string[] {
"productCategoryId",
"1234",
"int"});
#line 33
- await testRunner.WhenAsync("I call the method \'FindAsync\' with the parameter values", ((string)(null)), table355, "When ");
+ await testRunner.WhenAsync("I call the method \'FindAsync\' with the parameter values", ((string)(null)), table361, "When ");
#line hidden
- global::Reqnroll.Table table356 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table362 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table356.AddRow(new string[] {
+ table362.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 37
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table356, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table362, "Then ");
#line hidden
#line 40
await testRunner.AndAsync("the result is null", ((string)(null)), ((global::Reqnroll.Table)(null)), "And ");
@@ -288,89 +288,85 @@ public async System.Threading.Tasks.Task FindAllAsync_1_5()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table357 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table363 = new global::Reqnroll.Table(new string[] {
"PageNumber",
"PageSize"});
- table357.AddRow(new string[] {
+ table363.AddRow(new string[] {
"1",
"5"});
#line 43
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table357, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table363, "When ");
#line hidden
- global::Reqnroll.Table table358 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table364 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table358.AddRow(new string[] {
+ table364.AddRow(new string[] {
"pageingFilter",
"{{model}}",
"AdventureWorksDemo.Data.Paging.PagingFilter"});
#line 46
- await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table358, "And ");
+ await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table364, "And ");
#line hidden
- global::Reqnroll.Table table359 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table365 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table359.AddRow(new string[] {
+ table365.AddRow(new string[] {
"AdventureWorksDemo.Data.Paging.PagedList"});
#line 49
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table359, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table365, "Then ");
#line hidden
- global::Reqnroll.Table table360 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table366 = new global::Reqnroll.Table(new string[] {
"TotalPages",
"TotalCount",
"PageSize",
- "CurrentPage",
- "Count",
- "Capacity"});
- table360.AddRow(new string[] {
+ "CurrentPage"});
+ table366.AddRow(new string[] {
"9",
"42",
"5",
- "1",
- "5",
- "5"});
+ "1"});
#line 52
- await testRunner.AndAsync("the PagedList values are", ((string)(null)), table360, "And ");
+ await testRunner.AndAsync("the PagedList values are", ((string)(null)), table366, "And ");
#line hidden
- global::Reqnroll.Table table361 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table367 = new global::Reqnroll.Table(new string[] {
"ModifiedDate",
"Name",
"ParentProductCategoryId",
"ProductCategoryId",
"Rowguid"});
- table361.AddRow(new string[] {
+ table367.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Accessories",
"",
"4",
"2be3be36-d9a2-4eee-b593-ed895d97c2a6"});
- table361.AddRow(new string[] {
+ table367.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Bikes",
"",
"1",
"cfbda25c-df71-47a7-b81b-64ee161aa37c"});
- table361.AddRow(new string[] {
+ table367.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Components",
"",
"2",
"c657828d-d808-4aba-91a3-af2ce02300e9"});
- table361.AddRow(new string[] {
+ table367.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Clothing",
"",
"3",
"10a7c342-ca82-48d4-8a38-46a2eb089b74"});
- table361.AddRow(new string[] {
+ table367.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Mountain Bikes",
"1",
"5",
"2d364ade-264a-433c-b092-4fcbf3804e01"});
#line 55
- await testRunner.AndAsync("the results are", ((string)(null)), table361, "And ");
+ await testRunner.AndAsync("the results are", ((string)(null)), table367, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -397,311 +393,307 @@ public async System.Threading.Tasks.Task FindAllAsync_1_500()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table362 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table368 = new global::Reqnroll.Table(new string[] {
"PageNumber",
"PageSize"});
- table362.AddRow(new string[] {
+ table368.AddRow(new string[] {
"1",
"500"});
#line 64
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table362, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table368, "When ");
#line hidden
- global::Reqnroll.Table table363 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table369 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table363.AddRow(new string[] {
+ table369.AddRow(new string[] {
"pageingFilter",
"{{model}}",
"AdventureWorksDemo.Data.Paging.PagingFilter"});
#line 67
- await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table363, "And ");
+ await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table369, "And ");
#line hidden
- global::Reqnroll.Table table364 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table370 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table364.AddRow(new string[] {
+ table370.AddRow(new string[] {
"AdventureWorksDemo.Data.Paging.PagedList"});
#line 70
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table364, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table370, "Then ");
#line hidden
- global::Reqnroll.Table table365 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table371 = new global::Reqnroll.Table(new string[] {
"TotalPages",
"TotalCount",
"PageSize",
- "CurrentPage",
- "Count",
- "Capacity"});
- table365.AddRow(new string[] {
+ "CurrentPage"});
+ table371.AddRow(new string[] {
"1",
"42",
"100",
- "1",
- "42",
- "42"});
+ "1"});
#line 73
- await testRunner.AndAsync("the PagedList values are", ((string)(null)), table365, "And ");
+ await testRunner.AndAsync("the PagedList values are", ((string)(null)), table371, "And ");
#line hidden
- global::Reqnroll.Table table366 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table372 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"1",
"",
"Bikes",
"6/1/2002 12:00:00 AM",
"cfbda25c-df71-47a7-b81b-64ee161aa37c"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"2",
"",
"Components",
"6/1/2002 12:00:00 AM",
"c657828d-d808-4aba-91a3-af2ce02300e9"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"3",
"",
"Clothing",
"6/1/2002 12:00:00 AM",
"10a7c342-ca82-48d4-8a38-46a2eb089b74"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"4",
"",
"Accessories",
"6/1/2002 12:00:00 AM",
"2be3be36-d9a2-4eee-b593-ed895d97c2a6"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"5",
"1",
"Mountain Bikes",
"6/1/2002 12:00:00 AM",
"2d364ade-264a-433c-b092-4fcbf3804e01"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"6",
"1",
"Road Bikes",
"6/1/2002 12:00:00 AM",
"000310c0-bcc8-42c4-b0c3-45ae611af06b"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"7",
"1",
"Touring Bikes",
"6/1/2002 12:00:00 AM",
"02c5061d-ecdc-4274-b5f1-e91d76bc3f37"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"8",
"2",
"Handlebars",
"6/1/2002 12:00:00 AM",
"3ef2c725-7135-4c85-9ae6-ae9a3bdd9283"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"9",
"2",
"Bottom Brackets",
"6/1/2002 12:00:00 AM",
"a9e54089-8a1e-4cf5-8646-e3801f685934"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"10",
"2",
"Brakes",
"6/1/2002 12:00:00 AM",
"d43ba4a3-ef0d-426b-90eb-4be4547dd30c"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"11",
"2",
"Chains",
"6/1/2002 12:00:00 AM",
"e93a7231-f16c-4b0f-8c41-c73fdec62da0"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"12",
"2",
"Cranksets",
"6/1/2002 12:00:00 AM",
"4f644521-422b-4f19-974a-e3df6102567e"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"13",
"2",
"Derailleurs",
"6/1/2002 12:00:00 AM",
"1830d70c-aa2a-40c0-a271-5ba86f38f8bf"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"14",
"2",
"Forks",
"6/1/2002 12:00:00 AM",
"b5f9ba42-b69b-4fdd-b2ec-57fb7b42e3cf"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"15",
"2",
"Headsets",
"6/1/2002 12:00:00 AM",
"7c782bbe-5a16-495a-aa50-10afe5a84af2"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"16",
"2",
"Mountain Frames",
"6/1/2002 12:00:00 AM",
"61b21b65-e16a-4be7-9300-4d8e9db861be"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"17",
"2",
"Pedals",
"6/1/2002 12:00:00 AM",
"6d24ac07-7a84-4849-864a-865a14125bc9"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"18",
"2",
"Road Frames",
"6/1/2002 12:00:00 AM",
"5515f857-075b-4f9a-87b7-43b4997077b3"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"19",
"2",
"Saddles",
"6/1/2002 12:00:00 AM",
"049fffa3-9d30-46df-82f7-f20730ec02b3"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"20",
"2",
"Touring Frames",
"6/1/2002 12:00:00 AM",
"d2e3f1a8-56c4-4f36-b29d-5659fc0d2789"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"21",
"2",
"Wheels",
"6/1/2002 12:00:00 AM",
"43521287-4b0b-438e-b80e-d82d9ad7c9f0"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"22",
"3",
"Bib-Shorts",
"6/1/2002 12:00:00 AM",
"67b58d2b-5798-4a90-8c6c-5ddacf057171"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"23",
"3",
"Caps",
"6/1/2002 12:00:00 AM",
"430dd6a8-a755-4b23-bb05-52520107da5f"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"24",
"3",
"Gloves",
"6/1/2002 12:00:00 AM",
"92d5657b-0032-4e49-bad5-41a441a70942"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"25",
"3",
"Jerseys",
"6/1/2002 12:00:00 AM",
"09e91437-ba4f-4b1a-8215-74184fd95db8"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"26",
"3",
"Shorts",
"6/1/2002 12:00:00 AM",
"1a5ba5b3-03c3-457c-b11e-4fa85ede87da"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"27",
"3",
"Socks",
"6/1/2002 12:00:00 AM",
"701019c3-09fe-4949-8386-c6ce686474e5"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"28",
"3",
"Tights",
"6/1/2002 12:00:00 AM",
"5deb3e55-9897-4416-b18a-515e970bc2d1"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"29",
"3",
"Vests",
"6/1/2002 12:00:00 AM",
"9ad7fe93-5ba0-4736-b578-ff80a2071297"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"30",
"4",
"Bike Racks",
"6/1/2002 12:00:00 AM",
"4624b5ce-66d6-496b-9201-c053df3556cc"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"31",
"4",
"Bike Stands",
"6/1/2002 12:00:00 AM",
"43b445c8-b820-424e-a1d5-90d81da0b46f"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"32",
"4",
"Bottles and Cages",
"6/1/2002 12:00:00 AM",
"9b7dff41-9fa3-4776-8def-2c9a48c8b779"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"33",
"4",
"Cleaners",
"6/1/2002 12:00:00 AM",
"9ad3bcf0-244d-4ec4-a6a0-fb701351c6a3"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"34",
"4",
"Fenders",
"6/1/2002 12:00:00 AM",
"1697f8a2-0a08-4883-b7dd-d19117b4e9a7"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"35",
"4",
"Helmets",
"6/1/2002 12:00:00 AM",
"f5e07a33-c9e0-439c-b5f3-9f25fb65becc"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"36",
"4",
"Hydration Packs",
"6/1/2002 12:00:00 AM",
"646a8906-fc87-4267-a443-9c6d791e6693"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"37",
"4",
"Lights",
"6/1/2002 12:00:00 AM",
"954178ba-624f-42db-95f6-ca035f36d130"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"38",
"4",
"Locks",
"6/1/2002 12:00:00 AM",
"19646983-3fa0-4773-9a0c-f34c49df9bc8"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"39",
"4",
"Panniers",
"6/1/2002 12:00:00 AM",
"3002a5d5-fec3-464b-bef3-e0f81d35f431"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"40",
"4",
"Pumps",
"6/1/2002 12:00:00 AM",
"fe4d46f2-c87c-48c5-a4a1-3f55712d80b1"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table366.AddRow(new string[] {
+ table372.AddRow(new string[] {
"42",
"",
"Record to Delete",
"6/1/2005 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 76
- await testRunner.AndAsync("the results are", ((string)(null)), table366, "And ");
+ await testRunner.AndAsync("the results are", ((string)(null)), table372, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -728,89 +720,85 @@ public async System.Threading.Tasks.Task FindAllAsync_2_5()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table367 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table373 = new global::Reqnroll.Table(new string[] {
"PageNumber",
"PageSize"});
- table367.AddRow(new string[] {
+ table373.AddRow(new string[] {
"2",
"5"});
#line 121
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table367, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table373, "When ");
#line hidden
- global::Reqnroll.Table table368 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table374 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table368.AddRow(new string[] {
+ table374.AddRow(new string[] {
"pageingFilter",
"{{model}}",
"AdventureWorksDemo.Data.Paging.PagingFilter"});
#line 124
- await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table368, "And ");
+ await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table374, "And ");
#line hidden
- global::Reqnroll.Table table369 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table375 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table369.AddRow(new string[] {
+ table375.AddRow(new string[] {
"AdventureWorksDemo.Data.Paging.PagedList"});
#line 127
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table369, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table375, "Then ");
#line hidden
- global::Reqnroll.Table table370 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table376 = new global::Reqnroll.Table(new string[] {
"TotalPages",
"TotalCount",
"PageSize",
- "CurrentPage",
- "Count",
- "Capacity"});
- table370.AddRow(new string[] {
+ "CurrentPage"});
+ table376.AddRow(new string[] {
"9",
"42",
"5",
- "2",
- "5",
- "5"});
+ "2"});
#line 130
- await testRunner.AndAsync("the PagedList values are", ((string)(null)), table370, "And ");
+ await testRunner.AndAsync("the PagedList values are", ((string)(null)), table376, "And ");
#line hidden
- global::Reqnroll.Table table371 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table377 = new global::Reqnroll.Table(new string[] {
"ModifiedDate",
"Name",
"ParentProductCategoryId",
"ProductCategoryId",
"Rowguid"});
- table371.AddRow(new string[] {
+ table377.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Road Bikes",
"1",
"6",
"000310c0-bcc8-42c4-b0c3-45ae611af06b"});
- table371.AddRow(new string[] {
+ table377.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Touring Bikes",
"1",
"7",
"02c5061d-ecdc-4274-b5f1-e91d76bc3f37"});
- table371.AddRow(new string[] {
+ table377.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Handlebars",
"2",
"8",
"3ef2c725-7135-4c85-9ae6-ae9a3bdd9283"});
- table371.AddRow(new string[] {
+ table377.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Bottom Brackets",
"2",
"9",
"a9e54089-8a1e-4cf5-8646-e3801f685934"});
- table371.AddRow(new string[] {
+ table377.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Brakes",
"2",
"10",
"d43ba4a3-ef0d-426b-90eb-4be4547dd30c"});
#line 133
- await testRunner.AndAsync("the results are", ((string)(null)), table371, "And ");
+ await testRunner.AndAsync("the results are", ((string)(null)), table377, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -837,107 +825,103 @@ public async System.Threading.Tasks.Task FindAllAsync_2_8()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table372 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table378 = new global::Reqnroll.Table(new string[] {
"PageNumber",
"PageSize"});
- table372.AddRow(new string[] {
+ table378.AddRow(new string[] {
"2",
"8"});
#line 142
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table372, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table378, "When ");
#line hidden
- global::Reqnroll.Table table373 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table379 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table373.AddRow(new string[] {
+ table379.AddRow(new string[] {
"pageingFilter",
"{{model}}",
"AdventureWorksDemo.Data.Paging.PagingFilter"});
#line 145
- await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table373, "And ");
+ await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table379, "And ");
#line hidden
- global::Reqnroll.Table table374 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table380 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table374.AddRow(new string[] {
+ table380.AddRow(new string[] {
"AdventureWorksDemo.Data.Paging.PagedList"});
#line 148
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table374, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table380, "Then ");
#line hidden
- global::Reqnroll.Table table375 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table381 = new global::Reqnroll.Table(new string[] {
"TotalPages",
"TotalCount",
"PageSize",
- "CurrentPage",
- "Count",
- "Capacity"});
- table375.AddRow(new string[] {
+ "CurrentPage"});
+ table381.AddRow(new string[] {
"6",
"42",
"8",
- "2",
- "8",
- "8"});
+ "2"});
#line 151
- await testRunner.AndAsync("the PagedList values are", ((string)(null)), table375, "And ");
+ await testRunner.AndAsync("the PagedList values are", ((string)(null)), table381, "And ");
#line hidden
- global::Reqnroll.Table table376 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table382 = new global::Reqnroll.Table(new string[] {
"ModifiedDate",
"Name",
"ParentProductCategoryId",
"ProductCategoryId",
"Rowguid"});
- table376.AddRow(new string[] {
+ table382.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Bottom Brackets",
"2",
"9",
"a9e54089-8a1e-4cf5-8646-e3801f685934"});
- table376.AddRow(new string[] {
+ table382.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Brakes",
"2",
"10",
"d43ba4a3-ef0d-426b-90eb-4be4547dd30c"});
- table376.AddRow(new string[] {
+ table382.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Chains",
"2",
"11",
"e93a7231-f16c-4b0f-8c41-c73fdec62da0"});
- table376.AddRow(new string[] {
+ table382.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Cranksets",
"2",
"12",
"4f644521-422b-4f19-974a-e3df6102567e"});
- table376.AddRow(new string[] {
+ table382.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Derailleurs",
"2",
"13",
"1830d70c-aa2a-40c0-a271-5ba86f38f8bf"});
- table376.AddRow(new string[] {
+ table382.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Forks",
"2",
"14",
"b5f9ba42-b69b-4fdd-b2ec-57fb7b42e3cf"});
- table376.AddRow(new string[] {
+ table382.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Headsets",
"2",
"15",
"7c782bbe-5a16-495a-aa50-10afe5a84af2"});
- table376.AddRow(new string[] {
+ table382.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Mountain Frames",
"2",
"16",
"61b21b65-e16a-4be7-9300-4d8e9db861be"});
#line 154
- await testRunner.AndAsync("the results are", ((string)(null)), table376, "And ");
+ await testRunner.AndAsync("the results are", ((string)(null)), table382, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -964,59 +948,55 @@ public async System.Threading.Tasks.Task FindAllAsync_1234_5()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table377 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table383 = new global::Reqnroll.Table(new string[] {
"PageNumber",
"PageSize"});
- table377.AddRow(new string[] {
+ table383.AddRow(new string[] {
"1234",
"5"});
#line 166
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table377, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table383, "When ");
#line hidden
- global::Reqnroll.Table table378 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table384 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table378.AddRow(new string[] {
+ table384.AddRow(new string[] {
"pageingFilter",
"{{model}}",
"AdventureWorksDemo.Data.Paging.PagingFilter"});
#line 169
- await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table378, "And ");
+ await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table384, "And ");
#line hidden
- global::Reqnroll.Table table379 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table385 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table379.AddRow(new string[] {
+ table385.AddRow(new string[] {
"AdventureWorksDemo.Data.Paging.PagedList"});
#line 172
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table379, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table385, "Then ");
#line hidden
- global::Reqnroll.Table table380 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table386 = new global::Reqnroll.Table(new string[] {
"TotalPages",
"TotalCount",
"PageSize",
- "CurrentPage",
- "Count",
- "Capacity"});
- table380.AddRow(new string[] {
+ "CurrentPage"});
+ table386.AddRow(new string[] {
"9",
"42",
"5",
- "1234",
- "0",
- "0"});
+ "1234"});
#line 175
- await testRunner.AndAsync("the PagedList values are", ((string)(null)), table380, "And ");
+ await testRunner.AndAsync("the PagedList values are", ((string)(null)), table386, "And ");
#line hidden
- global::Reqnroll.Table table381 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table387 = new global::Reqnroll.Table(new string[] {
"ModifiedDate",
"Name",
"ParentProductCategoryId",
"ProductCategoryId",
"Rowguid"});
#line 178
- await testRunner.AndAsync("the results are", ((string)(null)), table381, "And ");
+ await testRunner.AndAsync("the results are", ((string)(null)), table387, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -1043,39 +1023,85 @@ public async System.Threading.Tasks.Task FindAllAsync_0_5()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table382 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table388 = new global::Reqnroll.Table(new string[] {
"PageNumber",
"PageSize"});
- table382.AddRow(new string[] {
+ table388.AddRow(new string[] {
"0",
"5"});
#line 182
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table382, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table388, "When ");
#line hidden
- global::Reqnroll.Table table383 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table389 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table383.AddRow(new string[] {
+ table389.AddRow(new string[] {
"pageingFilter",
"{{model}}",
"AdventureWorksDemo.Data.Paging.PagingFilter"});
#line 185
- await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table383, "And ");
+ await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table389, "And ");
#line hidden
- global::Reqnroll.Table table384 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table390 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table384.AddRow(new string[] {
- "System.ArgumentOutOfRangeException"});
+ table390.AddRow(new string[] {
+ "AdventureWorksDemo.Data.Paging.PagedList"});
#line 188
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table384, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table390, "Then ");
#line hidden
- global::Reqnroll.Table table385 = new global::Reqnroll.Table(new string[] {
- "Expected"});
- table385.AddRow(new string[] {
- "Parameter pageNumber must be positive (Parameter \'pageNumber\')"});
-#line 191
- await testRunner.AndAsync("the exception message is", ((string)(null)), table385, "And ");
+ global::Reqnroll.Table table391 = new global::Reqnroll.Table(new string[] {
+ "TotalPages",
+ "TotalCount",
+ "PageSize",
+ "CurrentPage"});
+ table391.AddRow(new string[] {
+ "9",
+ "42",
+ "5",
+ "1"});
+#line 192
+ await testRunner.AndAsync("the PagedList values are", ((string)(null)), table391, "And ");
+#line hidden
+ global::Reqnroll.Table table392 = new global::Reqnroll.Table(new string[] {
+ "ModifiedDate",
+ "Name",
+ "ParentProductCategoryId",
+ "ProductCategoryId",
+ "Rowguid"});
+ table392.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Bikes",
+ "",
+ "1",
+ "cfbda25c-df71-47a7-b81b-64ee161aa37c"});
+ table392.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Components",
+ "",
+ "2",
+ "c657828d-d808-4aba-91a3-af2ce02300e9"});
+ table392.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Clothing",
+ "",
+ "3",
+ "10a7c342-ca82-48d4-8a38-46a2eb089b74"});
+ table392.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Accessories",
+ "",
+ "4",
+ "2be3be36-d9a2-4eee-b593-ed895d97c2a6"});
+ table392.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Mountain Bikes",
+ "1",
+ "5",
+ "2d364ade-264a-433c-b092-4fcbf3804e01"});
+#line 195
+ await testRunner.AndAsync("the results are", ((string)(null)), table392, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -1089,7 +1115,7 @@ public async System.Threading.Tasks.Task FindAllAsync_0_0()
string[] tagsOfScenario = ((string[])(null));
System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("FindAllAsync_0_0", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 195
+#line 203
this.ScenarioInitialize(scenarioInfo);
#line hidden
if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags)))
@@ -1102,39 +1128,205 @@ public async System.Threading.Tasks.Task FindAllAsync_0_0()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table386 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table393 = new global::Reqnroll.Table(new string[] {
"PageNumber",
"PageSize"});
- table386.AddRow(new string[] {
+ table393.AddRow(new string[] {
"0",
"0"});
-#line 196
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table386, "When ");
+#line 204
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table393, "When ");
#line hidden
- global::Reqnroll.Table table387 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table394 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table387.AddRow(new string[] {
+ table394.AddRow(new string[] {
"pageingFilter",
"{{model}}",
"AdventureWorksDemo.Data.Paging.PagingFilter"});
-#line 199
- await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table387, "And ");
+#line 207
+ await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table394, "And ");
#line hidden
- global::Reqnroll.Table table388 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table395 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table388.AddRow(new string[] {
- "System.ArgumentOutOfRangeException"});
-#line 202
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table388, "Then ");
+ table395.AddRow(new string[] {
+ "AdventureWorksDemo.Data.Paging.PagedList"});
+#line 210
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table395, "Then ");
#line hidden
- global::Reqnroll.Table table389 = new global::Reqnroll.Table(new string[] {
- "Expected"});
- table389.AddRow(new string[] {
- "Parameter pageNumber must be positive (Parameter \'pageNumber\')"});
-#line 205
- await testRunner.AndAsync("the exception message is", ((string)(null)), table389, "And ");
+ global::Reqnroll.Table table396 = new global::Reqnroll.Table(new string[] {
+ "TotalPages",
+ "TotalCount",
+ "PageSize",
+ "CurrentPage"});
+ table396.AddRow(new string[] {
+ "2",
+ "42",
+ "25",
+ "1"});
+#line 214
+ await testRunner.AndAsync("the PagedList values are", ((string)(null)), table396, "And ");
+#line hidden
+ global::Reqnroll.Table table397 = new global::Reqnroll.Table(new string[] {
+ "ModifiedDate",
+ "Name",
+ "ParentProductCategoryId",
+ "ProductCategoryId",
+ "Rowguid"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Bikes",
+ "",
+ "1",
+ "cfbda25c-df71-47a7-b81b-64ee161aa37c"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Components",
+ "",
+ "2",
+ "c657828d-d808-4aba-91a3-af2ce02300e9"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Clothing",
+ "",
+ "3",
+ "10a7c342-ca82-48d4-8a38-46a2eb089b74"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Accessories",
+ "",
+ "4",
+ "2be3be36-d9a2-4eee-b593-ed895d97c2a6"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Mountain Bikes",
+ "1",
+ "5",
+ "2d364ade-264a-433c-b092-4fcbf3804e01"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Road Bikes",
+ "1",
+ "6",
+ "000310c0-bcc8-42c4-b0c3-45ae611af06b"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Touring Bikes",
+ "1",
+ "7",
+ "02c5061d-ecdc-4274-b5f1-e91d76bc3f37"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Handlebars",
+ "2",
+ "8",
+ "3ef2c725-7135-4c85-9ae6-ae9a3bdd9283"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Bottom Brackets",
+ "2",
+ "9",
+ "a9e54089-8a1e-4cf5-8646-e3801f685934"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Brakes",
+ "2",
+ "10",
+ "d43ba4a3-ef0d-426b-90eb-4be4547dd30c"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Chains",
+ "2",
+ "11",
+ "e93a7231-f16c-4b0f-8c41-c73fdec62da0"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Cranksets",
+ "2",
+ "12",
+ "4f644521-422b-4f19-974a-e3df6102567e"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Derailleurs",
+ "2",
+ "13",
+ "1830d70c-aa2a-40c0-a271-5ba86f38f8bf"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Forks",
+ "2",
+ "14",
+ "b5f9ba42-b69b-4fdd-b2ec-57fb7b42e3cf"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Headsets",
+ "2",
+ "15",
+ "7c782bbe-5a16-495a-aa50-10afe5a84af2"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Mountain Frames",
+ "2",
+ "16",
+ "61b21b65-e16a-4be7-9300-4d8e9db861be"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Pedals",
+ "2",
+ "17",
+ "6d24ac07-7a84-4849-864a-865a14125bc9"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Road Frames",
+ "2",
+ "18",
+ "5515f857-075b-4f9a-87b7-43b4997077b3"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Saddles",
+ "2",
+ "19",
+ "049fffa3-9d30-46df-82f7-f20730ec02b3"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Touring Frames",
+ "2",
+ "20",
+ "d2e3f1a8-56c4-4f36-b29d-5659fc0d2789"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Wheels",
+ "2",
+ "21",
+ "43521287-4b0b-438e-b80e-d82d9ad7c9f0"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Bib-Shorts",
+ "3",
+ "22",
+ "67b58d2b-5798-4a90-8c6c-5ddacf057171"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Caps",
+ "3",
+ "23",
+ "430dd6a8-a755-4b23-bb05-52520107da5f"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Gloves",
+ "3",
+ "24",
+ "92d5657b-0032-4e49-bad5-41a441a70942"});
+ table397.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Jerseys",
+ "3",
+ "25",
+ "09e91437-ba4f-4b1a-8215-74184fd95db8"});
+#line 217
+ await testRunner.AndAsync("the results are", ((string)(null)), table397, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -1148,7 +1340,7 @@ public async System.Threading.Tasks.Task FindAllAsync_5_0()
string[] tagsOfScenario = ((string[])(null));
System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("FindAllAsync_5_0", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 209
+#line 245
this.ScenarioInitialize(scenarioInfo);
#line hidden
if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags)))
@@ -1161,39 +1353,55 @@ public async System.Threading.Tasks.Task FindAllAsync_5_0()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table390 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table398 = new global::Reqnroll.Table(new string[] {
"PageNumber",
"PageSize"});
- table390.AddRow(new string[] {
+ table398.AddRow(new string[] {
"5",
"0"});
-#line 210
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table390, "When ");
+#line 246
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table398, "When ");
#line hidden
- global::Reqnroll.Table table391 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table399 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table391.AddRow(new string[] {
+ table399.AddRow(new string[] {
"pageingFilter",
"{{model}}",
"AdventureWorksDemo.Data.Paging.PagingFilter"});
-#line 213
- await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table391, "And ");
+#line 249
+ await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table399, "And ");
#line hidden
- global::Reqnroll.Table table392 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table400 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table392.AddRow(new string[] {
- "System.ArgumentOutOfRangeException"});
-#line 216
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table392, "Then ");
+ table400.AddRow(new string[] {
+ "AdventureWorksDemo.Data.Paging.PagedList"});
+#line 252
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table400, "Then ");
#line hidden
- global::Reqnroll.Table table393 = new global::Reqnroll.Table(new string[] {
- "Expected"});
- table393.AddRow(new string[] {
- "Parameter pageSize must be positive (Parameter \'pageSize\')"});
-#line 219
- await testRunner.AndAsync("the exception message is", ((string)(null)), table393, "And ");
+ global::Reqnroll.Table table401 = new global::Reqnroll.Table(new string[] {
+ "TotalPages",
+ "TotalCount",
+ "PageSize",
+ "CurrentPage"});
+ table401.AddRow(new string[] {
+ "2",
+ "42",
+ "25",
+ "5"});
+#line 256
+ await testRunner.AndAsync("the PagedList values are", ((string)(null)), table401, "And ");
+#line hidden
+ global::Reqnroll.Table table402 = new global::Reqnroll.Table(new string[] {
+ "ModifiedDate",
+ "Name",
+ "ParentProductCategoryId",
+ "ProductCategoryId",
+ "Rowguid"});
+#line 259
+ await testRunner.AndAsync("the results are", ((string)(null)), table402, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
diff --git a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceUpdateTests.feature.cs b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceUpdateTests.feature.cs
index 88ea1e0..8b17258 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceUpdateTests.feature.cs
+++ b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceUpdateTests.feature.cs
@@ -128,19 +128,19 @@ public async System.Threading.Tasks.Task Update01()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table407 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table416 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table407.AddRow(new string[] {
+ table416.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table407.AddRow(new string[] {
+ table416.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -148,77 +148,77 @@ public async System.Threading.Tasks.Task Update01()
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 12
await testRunner.GivenAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table407, "Given ");
+ "", ((string)(null)), table416, "Given ");
#line hidden
- global::Reqnroll.Table table408 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table417 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"Name",
"ParentProductCategoryId"});
- table408.AddRow(new string[] {
+ table417.AddRow(new string[] {
"41",
"Ping Pong",
""});
#line 16
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table408, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table417, "When ");
#line hidden
- global::Reqnroll.Table table409 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table418 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table409.AddRow(new string[] {
+ table418.AddRow(new string[] {
"model",
"{{model}}",
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 19
- await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table409, "And ");
+ await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table418, "And ");
#line hidden
- global::Reqnroll.Table table410 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table419 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table410.AddRow(new string[] {
+ table419.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 22
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table410, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table419, "Then ");
#line hidden
- global::Reqnroll.Table table411 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table420 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table411.AddRow(new string[] {
+ table420.AddRow(new string[] {
"False",
"True",
""});
#line 25
- await testRunner.AndAsync("the result is", ((string)(null)), table411, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table420, "And ");
#line hidden
- global::Reqnroll.Table table412 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table421 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table412.AddRow(new string[] {
+ table421.AddRow(new string[] {
"41",
"",
"Ping Pong",
"5/24/2024 12:34:56 PM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
#line 28
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table412, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table421, "And ");
#line hidden
- global::Reqnroll.Table table413 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table422 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table413.AddRow(new string[] {
+ table422.AddRow(new string[] {
"41",
"",
"Ping Pong",
"5/24/2024 12:34:56 PM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table413.AddRow(new string[] {
+ table422.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -226,7 +226,7 @@ await testRunner.GivenAsync("the table \'SalesLT.ProductCategory\' filtered by \
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 31
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table413, "And ");
+ "", ((string)(null)), table422, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -253,19 +253,19 @@ public async System.Threading.Tasks.Task Update02()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table414 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table423 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table414.AddRow(new string[] {
+ table423.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table414.AddRow(new string[] {
+ table423.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -273,77 +273,77 @@ public async System.Threading.Tasks.Task Update02()
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 37
await testRunner.GivenAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table414, "Given ");
+ "", ((string)(null)), table423, "Given ");
#line hidden
- global::Reqnroll.Table table415 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table424 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"Name",
"ParentProductCategoryId"});
- table415.AddRow(new string[] {
+ table424.AddRow(new string[] {
"41",
"Ping Pong",
"42"});
#line 41
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table415, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table424, "When ");
#line hidden
- global::Reqnroll.Table table416 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table425 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table416.AddRow(new string[] {
+ table425.AddRow(new string[] {
"model",
"{{model}}",
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 44
- await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table416, "And ");
+ await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table425, "And ");
#line hidden
- global::Reqnroll.Table table417 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table426 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table417.AddRow(new string[] {
+ table426.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 47
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table417, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table426, "Then ");
#line hidden
- global::Reqnroll.Table table418 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table427 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table418.AddRow(new string[] {
+ table427.AddRow(new string[] {
"False",
"True",
""});
#line 50
- await testRunner.AndAsync("the result is", ((string)(null)), table418, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table427, "And ");
#line hidden
- global::Reqnroll.Table table419 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table428 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table419.AddRow(new string[] {
+ table428.AddRow(new string[] {
"41",
"42",
"Ping Pong",
"5/24/2024 12:34:56 PM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
#line 53
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table419, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table428, "And ");
#line hidden
- global::Reqnroll.Table table420 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table429 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table420.AddRow(new string[] {
+ table429.AddRow(new string[] {
"41",
"42",
"Ping Pong",
"5/24/2024 12:34:56 PM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table420.AddRow(new string[] {
+ table429.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -351,7 +351,7 @@ await testRunner.GivenAsync("the table \'SalesLT.ProductCategory\' filtered by \
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 56
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table420, "And ");
+ "", ((string)(null)), table429, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -378,19 +378,19 @@ public async System.Threading.Tasks.Task Update03()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table421 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table430 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table421.AddRow(new string[] {
+ table430.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table421.AddRow(new string[] {
+ table430.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -398,77 +398,77 @@ public async System.Threading.Tasks.Task Update03()
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 61
await testRunner.GivenAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table421, "Given ");
+ "", ((string)(null)), table430, "Given ");
#line hidden
- global::Reqnroll.Table table422 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table431 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"Name",
"ParentProductCategoryId"});
- table422.AddRow(new string[] {
+ table431.AddRow(new string[] {
"41",
"Tires and Tubes",
"42"});
#line 65
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table422, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table431, "When ");
#line hidden
- global::Reqnroll.Table table423 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table432 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table423.AddRow(new string[] {
+ table432.AddRow(new string[] {
"model",
"{{model}}",
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 68
- await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table423, "And ");
+ await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table432, "And ");
#line hidden
- global::Reqnroll.Table table424 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table433 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table424.AddRow(new string[] {
+ table433.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 71
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table424, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table433, "Then ");
#line hidden
- global::Reqnroll.Table table425 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table434 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table425.AddRow(new string[] {
+ table434.AddRow(new string[] {
"False",
"True",
""});
#line 74
- await testRunner.AndAsync("the result is", ((string)(null)), table425, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table434, "And ");
#line hidden
- global::Reqnroll.Table table426 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table435 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table426.AddRow(new string[] {
+ table435.AddRow(new string[] {
"41",
"42",
"Tires and Tubes",
"5/24/2024 12:34:56 PM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
#line 77
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table426, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table435, "And ");
#line hidden
- global::Reqnroll.Table table427 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table436 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table427.AddRow(new string[] {
+ table436.AddRow(new string[] {
"41",
"42",
"Tires and Tubes",
"5/24/2024 12:34:56 PM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table427.AddRow(new string[] {
+ table436.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -476,7 +476,7 @@ await testRunner.GivenAsync("the table \'SalesLT.ProductCategory\' filtered by \
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 80
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table427, "And ");
+ "", ((string)(null)), table436, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -503,19 +503,19 @@ public async System.Threading.Tasks.Task UpdateInvalidName()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table428 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table437 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table428.AddRow(new string[] {
+ table437.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table428.AddRow(new string[] {
+ table437.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -523,82 +523,82 @@ public async System.Threading.Tasks.Task UpdateInvalidName()
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 87
await testRunner.GivenAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table428, "Given ");
+ "", ((string)(null)), table437, "Given ");
#line hidden
- global::Reqnroll.Table table429 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table438 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"Name",
"ParentProductCategoryId"});
- table429.AddRow(new string[] {
+ table438.AddRow(new string[] {
"41",
"Hi",
"42"});
#line 91
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table429, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table438, "When ");
#line hidden
- global::Reqnroll.Table table430 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table439 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table430.AddRow(new string[] {
+ table439.AddRow(new string[] {
"model",
"{{model}}",
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 94
- await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table430, "And ");
+ await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table439, "And ");
#line hidden
- global::Reqnroll.Table table431 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table440 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table431.AddRow(new string[] {
+ table440.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 97
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table431, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table440, "Then ");
#line hidden
- global::Reqnroll.Table table432 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table441 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess"});
- table432.AddRow(new string[] {
+ table441.AddRow(new string[] {
"True",
"False"});
#line 100
- await testRunner.AndAsync("the result is", ((string)(null)), table432, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table441, "And ");
#line hidden
- global::Reqnroll.Table table433 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table442 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table433.AddRow(new string[] {
+ table442.AddRow(new string[] {
"\'Name\' must be between 3 and 50 characters. You entered 2 characters."});
#line 103
- await testRunner.AndAsync("the results property \'Message\' contains", ((string)(null)), table433, "And ");
+ await testRunner.AndAsync("the results property \'Message\' contains", ((string)(null)), table442, "And ");
#line hidden
- global::Reqnroll.Table table434 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table443 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table434.AddRow(new string[] {
+ table443.AddRow(new string[] {
"41",
"42",
"Hi",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
#line 106
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table434, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table443, "And ");
#line hidden
- global::Reqnroll.Table table435 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table444 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table435.AddRow(new string[] {
+ table444.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table435.AddRow(new string[] {
+ table444.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -606,7 +606,7 @@ await testRunner.GivenAsync("the table \'SalesLT.ProductCategory\' filtered by \
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 109
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table435, "And ");
+ "", ((string)(null)), table444, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -636,75 +636,75 @@ public async System.Threading.Tasks.Task UpdateNoChange()
#line 115
await testRunner.GivenAsync("I don\'t reset the database after the scenario", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given ");
#line hidden
- global::Reqnroll.Table table436 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table445 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name"});
- table436.AddRow(new string[] {
+ table445.AddRow(new string[] {
"41",
"4",
"Tires and Tubes"});
#line 116
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table436, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table445, "When ");
#line hidden
- global::Reqnroll.Table table437 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table446 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table437.AddRow(new string[] {
+ table446.AddRow(new string[] {
"model",
"{{model}}",
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 119
- await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table437, "And ");
+ await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table446, "And ");
#line hidden
- global::Reqnroll.Table table438 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table447 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table438.AddRow(new string[] {
+ table447.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 122
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table438, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table447, "Then ");
#line hidden
- global::Reqnroll.Table table439 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table448 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table439.AddRow(new string[] {
+ table448.AddRow(new string[] {
"False",
"True",
"Record is already up to date!"});
#line 125
- await testRunner.AndAsync("the result is", ((string)(null)), table439, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table448, "And ");
#line hidden
- global::Reqnroll.Table table440 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table449 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table440.AddRow(new string[] {
+ table449.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
#line 128
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table440, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table449, "And ");
#line hidden
- global::Reqnroll.Table table441 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table450 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table441.AddRow(new string[] {
+ table450.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table441.AddRow(new string[] {
+ table450.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -712,7 +712,7 @@ public async System.Threading.Tasks.Task UpdateNoChange()
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 131
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table441, "And ");
+ "", ((string)(null)), table450, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -742,75 +742,75 @@ public async System.Threading.Tasks.Task UpdateUnknownRecord()
#line 137
await testRunner.GivenAsync("I don\'t reset the database after the scenario", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given ");
#line hidden
- global::Reqnroll.Table table442 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table451 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name"});
- table442.AddRow(new string[] {
+ table451.AddRow(new string[] {
"1234",
"4",
"UpdateUnknownRecord"});
#line 138
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table442, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table451, "When ");
#line hidden
- global::Reqnroll.Table table443 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table452 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table443.AddRow(new string[] {
+ table452.AddRow(new string[] {
"model",
"{{model}}",
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 141
- await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table443, "And ");
+ await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table452, "And ");
#line hidden
- global::Reqnroll.Table table444 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table453 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table444.AddRow(new string[] {
+ table453.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 144
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table444, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table453, "Then ");
#line hidden
- global::Reqnroll.Table table445 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table454 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table445.AddRow(new string[] {
+ table454.AddRow(new string[] {
"True",
"False",
"Unable to locate record to update!"});
#line 148
- await testRunner.AndAsync("the result is", ((string)(null)), table445, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table454, "And ");
#line hidden
- global::Reqnroll.Table table446 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table455 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table446.AddRow(new string[] {
+ table455.AddRow(new string[] {
"1234",
"4",
"UpdateUnknownRecord",
"1/1/0001 12:00:00 AM",
"00000000-0000-0000-0000-000000000000"});
#line 152
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table446, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table455, "And ");
#line hidden
- global::Reqnroll.Table table447 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table456 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table447.AddRow(new string[] {
+ table456.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table447.AddRow(new string[] {
+ table456.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -818,7 +818,7 @@ public async System.Threading.Tasks.Task UpdateUnknownRecord()
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 155
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table447, "And ");
+ "", ((string)(null)), table456, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
diff --git a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/StepDefinitions/StepDefinitions.cs b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/StepDefinitions/StepDefinitions.cs
index a7c18d8..57621fe 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/StepDefinitions/StepDefinitions.cs
+++ b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/StepDefinitions/StepDefinitions.cs
@@ -63,7 +63,9 @@ public void ThenTheExceptionMessageIs(DataTable dataTable)
public void ThenThePagedListValuesAre(DataTable expected)
{
IPagedList actual = (IPagedList)Helper.ScenarioContexts.GetResult;
- expected.CompareToInstance(actual);
+ List actualAsList = new() { actual };
+
+ expected.CompareToSet(actualAsList);
}
[Then("the result is")]
diff --git a/src/API/AdventureWorksDemo.Data.Tests/AdventureWorksDemo.Data.Tests.csproj b/src/API/AdventureWorksDemo.Data.Tests/AdventureWorksDemo.Data.Tests.csproj
new file mode 100644
index 0000000..1b74b87
--- /dev/null
+++ b/src/API/AdventureWorksDemo.Data.Tests/AdventureWorksDemo.Data.Tests.csproj
@@ -0,0 +1,45 @@
+
+
+
+ net9.0
+ latest
+ enable
+ enable
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/API/AdventureWorksDemo.Data.Tests.nUnit/Helpers/FakeDbContext_Address.cs b/src/API/AdventureWorksDemo.Data.Tests/Fakes/FakeDbContext_Address.cs
similarity index 90%
rename from src/API/AdventureWorksDemo.Data.Tests.nUnit/Helpers/FakeDbContext_Address.cs
rename to src/API/AdventureWorksDemo.Data.Tests/Fakes/FakeDbContext_Address.cs
index 4bbc299..ec5087c 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.nUnit/Helpers/FakeDbContext_Address.cs
+++ b/src/API/AdventureWorksDemo.Data.Tests/Fakes/FakeDbContext_Address.cs
@@ -1,9 +1,18 @@
-using AdventureWorksDemo.Data.Entities;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
-namespace AdventureWorksDemo.Data.Tests.nUnit.Helpers
+using AdventureWorksDemo.Data.Entities;
+
+namespace AdventureWorksDemo.Data.Tests.Fakes
{
+ [ExcludeFromCodeCoverage]
internal static class FakeDbContext
{
+ [ExcludeFromCodeCoverage]
internal static List FakeAddresses
{
get
diff --git a/src/API/AdventureWorksDemo.Data.Tests/Fakes/MockedDbContext.cs b/src/API/AdventureWorksDemo.Data.Tests/Fakes/MockedDbContext.cs
new file mode 100644
index 0000000..44445cd
--- /dev/null
+++ b/src/API/AdventureWorksDemo.Data.Tests/Fakes/MockedDbContext.cs
@@ -0,0 +1,22 @@
+using AdventureWorksDemo.Data.Entities;
+
+using MockQueryable.Moq;
+
+using Moq;
+
+namespace AdventureWorksDemo.Data.Tests.Fakes
+{
+ internal static class MockedDbContext
+ {
+ internal static Mock MockedDbContextAllData()
+ {
+ Mock dbContext = new();
+ // //
+
+ dbContext.Setup(m => m.Set()).Returns(FakeDbContext.FakeAddresses.BuildMockDbSet().Object);
+ // //
+
+ return dbContext;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/API/AdventureWorksDemo.Data.Tests/MSTestSettings.cs b/src/API/AdventureWorksDemo.Data.Tests/MSTestSettings.cs
new file mode 100644
index 0000000..aaf278c
--- /dev/null
+++ b/src/API/AdventureWorksDemo.Data.Tests/MSTestSettings.cs
@@ -0,0 +1 @@
+[assembly: Parallelize(Scope = ExecutionScope.MethodLevel)]
diff --git a/src/API/AdventureWorksDemo.Data.Tests.nUnit/Validation/AddressValidatorTests.cs b/src/API/AdventureWorksDemo.Data.Tests/Validaton/AddressValidatorTests.cs
similarity index 66%
rename from src/API/AdventureWorksDemo.Data.Tests.nUnit/Validation/AddressValidatorTests.cs
rename to src/API/AdventureWorksDemo.Data.Tests/Validaton/AddressValidatorTests.cs
index e783794..8a8e38a 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.nUnit/Validation/AddressValidatorTests.cs
+++ b/src/API/AdventureWorksDemo.Data.Tests/Validaton/AddressValidatorTests.cs
@@ -1,27 +1,22 @@
-using System;
-
-using AdventureWorksDemo.Common.Tests.Extensions;
-using AdventureWorksDemo.Data.Entities;
+using AdventureWorksDemo.Data.Entities;
using AdventureWorksDemo.Data.Validation;
-using FluentAssertions;
-
+using AdventureWorksDemo.Common.Tests.Extensions;
using FluentValidation.TestHelper;
-using NUnit.Framework;
-
-namespace AdventureWorksDemo.Data.Tests.nUnit.Validation
+namespace AdventureWorksDemo.Data.Tests.Validaton
{
- [TestFixture]
+ [TestClass]
public class AddressValidatorTests
{
- private Address _address;
+ private Address? _address;
+
private AddressValidator _validator = new();
- [TestCase("123")]
- [TestCase("{{PadRight:X:59}}")]
- [TestCase("{{PadRight:X:60}}")]
- [Test]
+ [DataRow("123")]
+ [DataRow("{{PadRight:X:59}}")]
+ [DataRow("{{PadRight:X:60}}")]
+ [TestMethod]
public void AddressLine1_Length_Between_3_And_60(string value)
{
// arrange
@@ -33,12 +28,12 @@ public void AddressLine1_Length_Between_3_And_60(string value)
result.ShouldNotHaveValidationErrorFor(m => m.AddressLine1);
}
- [TestCase("")]
- [TestCase("1")]
- [TestCase("12")]
- [TestCase("66")]
- [TestCase("{{PadRight:X:61}}")]
- [Test]
+ [DataRow("")]
+ [DataRow("1")]
+ [DataRow("12")]
+ [DataRow("66")]
+ [DataRow("{{PadRight:X:61}}")]
+ [TestMethod]
public void AddressLine1_Length_Not_Between_3_And_60(string value)
{
// arrange
@@ -50,10 +45,10 @@ public void AddressLine1_Length_Not_Between_3_And_60(string value)
result.ShouldHaveValidationErrorFor(m => m.AddressLine1);
}
- [TestCase("123")]
- [TestCase("{{PadRight:X:59}}")]
- [TestCase("{{PadRight:X:60}}")]
- [Test]
+ [DataRow("123")]
+ [DataRow("{{PadRight:X:59}}")]
+ [DataRow("{{PadRight:X:60}}")]
+ [TestMethod]
public void AddressLine2_Length_Between_3_And_60(string value)
{
// arrange
@@ -65,12 +60,12 @@ public void AddressLine2_Length_Between_3_And_60(string value)
result.ShouldNotHaveValidationErrorFor(m => m.AddressLine2);
}
- [TestCase("")]
- [TestCase("1")]
- [TestCase("12")]
- [TestCase("66")]
- [TestCase("{{PadRight:X:61}}")]
- [Test]
+ [DataRow("")]
+ [DataRow("1")]
+ [DataRow("12")]
+ [DataRow("66")]
+ [DataRow("{{PadRight:X:61}}")]
+ [TestMethod]
public void AddressLine2_Length_Not_Between_3_And_60(string value)
{
// arrange
@@ -82,11 +77,11 @@ public void AddressLine2_Length_Not_Between_3_And_60(string value)
result.ShouldHaveValidationErrorFor(m => m.AddressLine2);
}
- [TestCase("{{PadRight:X:3}}")]
- [TestCase("{{PadRight:X:4}}")]
- [TestCase("{{PadRight:X:30}}")]
- [TestCase("{{PadRight:X:29}}")]
- [Test]
+ [DataRow("{{PadRight:X:3}}")]
+ [DataRow("{{PadRight:X:4}}")]
+ [DataRow("{{PadRight:X:30}}")]
+ [DataRow("{{PadRight:X:29}}")]
+ [TestMethod]
public void City_Should_Have_Length_Between_3_And_30(string value)
{
// arrange
@@ -98,12 +93,12 @@ public void City_Should_Have_Length_Between_3_And_30(string value)
result.ShouldNotHaveValidationErrorFor(m => m.City);
}
- [TestCase("")]
- [TestCase("1")]
- [TestCase("12")]
- [TestCase("66")]
- [TestCase("{{PadRight:X:31}}")]
- [Test]
+ [DataRow("")]
+ [DataRow("1")]
+ [DataRow("12")]
+ [DataRow("66")]
+ [DataRow("{{PadRight:X:31}}")]
+ [TestMethod]
public void City_Should_Not_Have_Length_Between_3_And_30(string value)
{
// arrange
@@ -115,11 +110,11 @@ public void City_Should_Not_Have_Length_Between_3_And_30(string value)
result.ShouldHaveValidationErrorFor(m => m.City);
}
- [TestCase("{{PadRight:X:3}}")]
- [TestCase("{{PadRight:X:4}}")]
- [TestCase("{{PadRight:X:49}}")]
- [TestCase("{{PadRight:X:50}}")]
- [Test]
+ [DataRow("{{PadRight:X:3}}")]
+ [DataRow("{{PadRight:X:4}}")]
+ [DataRow("{{PadRight:X:49}}")]
+ [DataRow("{{PadRight:X:50}}")]
+ [TestMethod]
public void CountryRegion_Should_Have_Length_Between_3_And_50(string value)
{
// arrange
@@ -131,12 +126,12 @@ public void CountryRegion_Should_Have_Length_Between_3_And_50(string value)
result.ShouldNotHaveValidationErrorFor(m => m.CountryRegion);
}
- [TestCase("")]
- [TestCase("1")]
- [TestCase("12")]
- [TestCase("66")]
- [TestCase("{{PadRight:X:51}}")]
- [Test]
+ [DataRow("")]
+ [DataRow("1")]
+ [DataRow("12")]
+ [DataRow("66")]
+ [DataRow("{{PadRight:X:51}}")]
+ [TestMethod]
public void CountryRegion_Should_NotHave_Length_Between_3_And_50(string value)
{
// arrange
@@ -148,11 +143,11 @@ public void CountryRegion_Should_NotHave_Length_Between_3_And_50(string value)
result.ShouldHaveValidationErrorFor(m => m.CountryRegion);
}
- [TestCase("{{PadRight:X:3}}")]
- [TestCase("{{PadRight:X:4}}")]
- [TestCase("{{PadRight:X:14}}")]
- [TestCase("{{PadRight:X:15}}")]
- [Test]
+ [DataRow("{{PadRight:X:3}}")]
+ [DataRow("{{PadRight:X:4}}")]
+ [DataRow("{{PadRight:X:14}}")]
+ [DataRow("{{PadRight:X:15}}")]
+ [TestMethod]
public void PostalCode_Should_Have_Length_Between_3_And_15(string value)
{
// arrange
@@ -164,12 +159,12 @@ public void PostalCode_Should_Have_Length_Between_3_And_15(string value)
result.ShouldNotHaveValidationErrorFor(m => m.PostalCode);
}
- [TestCase("")]
- [TestCase("1")]
- [TestCase("12")]
- [TestCase("66")]
- [TestCase("{{PadRight:X:16}}")]
- [Test]
+ [DataRow("")]
+ [DataRow("1")]
+ [DataRow("12")]
+ [DataRow("66")]
+ [DataRow("{{PadRight:X:16}}")]
+ [TestMethod]
public void PostalCode_Should_NotHave_Length_Between_3_And_15(string value)
{
// arrange
@@ -181,26 +176,11 @@ public void PostalCode_Should_NotHave_Length_Between_3_And_15(string value)
result.ShouldHaveValidationErrorFor(m => m.PostalCode);
}
- [SetUp]
- public void SetUp()
- {
- _validator = new AddressValidator();
- _address = new Address()
- {
- AddressId = 1,
- AddressLine1 = "12345",
- AddressLine2 = "12345",
- City = "12345",
- CountryRegion = "12345",
- PostalCode = "12345"
- };
- }
-
- [TestCase("{{PadRight:X:3}}")]
- [TestCase("{{PadRight:X:4}}")]
- [TestCase("{{PadRight:X:49}}")]
- [TestCase("{{PadRight:X:50}}")]
- [Test]
+ [DataRow("{{PadRight:X:3}}")]
+ [DataRow("{{PadRight:X:4}}")]
+ [DataRow("{{PadRight:X:49}}")]
+ [DataRow("{{PadRight:X:50}}")]
+ [TestMethod]
public void StateProvince_Should_Have_Length_Between_3_And_50(string value)
{
// arrange
@@ -212,12 +192,12 @@ public void StateProvince_Should_Have_Length_Between_3_And_50(string value)
result.ShouldNotHaveValidationErrorFor(m => m.StateProvince);
}
- [TestCase("")]
- [TestCase("1")]
- [TestCase("12")]
- [TestCase("66")]
- [TestCase("{{PadRight:X:51}}")]
- [Test]
+ [DataRow("")]
+ [DataRow("1")]
+ [DataRow("12")]
+ [DataRow("66")]
+ [DataRow("{{PadRight:X:51}}")]
+ [TestMethod]
public void StateProvince_Should_NotHave_Length_Between_3_And_50(string value)
{
// arrange
@@ -229,12 +209,19 @@ public void StateProvince_Should_NotHave_Length_Between_3_And_50(string value)
result.ShouldHaveValidationErrorFor(m => m.StateProvince);
}
- //[Test]
- //public void StateProvince_Should_Have_Length_Between_3_And_50()
- //{
- // _validator.ShouldHaveValidationErrorFor(a => a.StateProvince, "ST");
- // _validator.ShouldHaveValidationErrorFor(a => a.StateProvince, new string('S', 51));
- // _validator.ShouldNotHaveValidationErrorFor(a => a.StateProvince, "Valid State");
- //}
+ [TestInitialize]
+ public void TestInitialize()
+ {
+ _validator = new AddressValidator();
+ _address = new Address()
+ {
+ AddressId = 1,
+ AddressLine1 = "12345",
+ AddressLine2 = "12345",
+ City = "12345",
+ CountryRegion = "12345",
+ PostalCode = "12345"
+ };
+ }
}
}
\ No newline at end of file
diff --git a/src/API/AdventureWorksDemo.Data.Tests/Validaton/ProductCategoryValidatorTests.cs b/src/API/AdventureWorksDemo.Data.Tests/Validaton/ProductCategoryValidatorTests.cs
new file mode 100644
index 0000000..3c6f961
--- /dev/null
+++ b/src/API/AdventureWorksDemo.Data.Tests/Validaton/ProductCategoryValidatorTests.cs
@@ -0,0 +1,63 @@
+using AdventureWorksDemo.Data.Entities;
+using AdventureWorksDemo.Data.Validation;
+
+using AdventureWorksDemo.Common.Tests.Extensions;
+using Microsoft.Extensions.Time.Testing;
+using FluentValidation.TestHelper;
+
+namespace AdventureWorksDemo.Data.Tests.Validaton
+{
+ [TestClass]
+ public class ProductCategoryValidatorTests
+ {
+ private readonly ProductCategoryValidator _validator = new();
+ private FakeTimeProvider _fakeTimeProvider = new();
+ private ProductCategory _model = new();
+
+ [DataRow("")]
+ [DataRow("{{PadRight:X:1}}")]
+ [DataRow("{{PadRight:X:2}}")]
+ [DataRow("{{PadRight:X:51}}")]
+ [DataRow("{{PadRight:X:93742}}")]
+ [TestMethod]
+ public void NameOutSideBounds(string value)
+ {
+ // arrange
+ _model.Name = value.InterpretValue();
+ // act
+ var result = _validator.TestValidate(_model);
+ //assert
+ result.ShouldHaveValidationErrorFor(m => m.Name);
+ }
+
+ [DataRow("{{PadRight:X:10}}")]
+ [DataRow("{{PadRight:X:3}}")]
+ [DataRow("{{PadRight:X:4}}")]
+ [DataRow("{{PadRight:X:40}}")]
+ [DataRow("{{PadRight:X:50}}")]
+ [TestMethod]
+ public void NameWithinBounds(string value)
+ {
+ // arrange
+ _model.Name = value.InterpretValue();
+ // act
+ var result = _validator.TestValidate(_model);
+ //assert
+ result.ShouldNotHaveValidationErrorFor(m => m.Name);
+ }
+
+ [TestInitialize]
+ public void TestInitialize()
+ {
+ _fakeTimeProvider = new();
+ _fakeTimeProvider.SetUtcNow(new DateTimeOffset(new DateTime(2024, 8, 17, 12, 34, 56, DateTimeKind.Local)));
+ _model = new ProductCategory()
+ {
+ Name = "12345",
+ ModifiedDate = _fakeTimeProvider.GetUtcNow().UtcDateTime,
+ ProductCategoryId = 234,
+ Rowguid = 1.ToGuid(),
+ };
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/API/AdventureWorksDemo.Data.Tests/Validaton/ProductDescriptionValidatorTests.cs b/src/API/AdventureWorksDemo.Data.Tests/Validaton/ProductDescriptionValidatorTests.cs
new file mode 100644
index 0000000..75589e5
--- /dev/null
+++ b/src/API/AdventureWorksDemo.Data.Tests/Validaton/ProductDescriptionValidatorTests.cs
@@ -0,0 +1,63 @@
+using AdventureWorksDemo.Data.Entities;
+using AdventureWorksDemo.Data.Validation;
+
+using AdventureWorksDemo.Common.Tests.Extensions;
+using FluentValidation.TestHelper;
+using Microsoft.Extensions.Time.Testing;
+
+namespace AdventureWorksDemo.Data.Tests.Validaton
+{
+ [TestClass]
+ public class ProductDescriptionValidatorTests
+ {
+ private readonly ProductDescriptionValidator _validator = new();
+ private FakeTimeProvider _fakeTimeProvider = new();
+ private ProductDescription _productDescription = new();
+
+ [DataRow("")]
+ [DataRow("{{PadRight:X:1}}")]
+ [DataRow("{{PadRight:X:2}}")]
+ [DataRow("{{PadRight:X:401}}")]
+ [DataRow("{{PadRight:X:402}}")]
+ [TestMethod]
+ public void DescriptionOutSideBounds(string value)
+ {
+ // arrange
+ _productDescription.Description = value.InterpretValue();
+ // act
+ var result = _validator.TestValidate(_productDescription);
+ //assert
+ result.ShouldHaveValidationErrorFor(m => m.Description);
+ }
+
+ [DataRow("{{PadRight:X:200}}")]
+ [DataRow("{{PadRight:X:3}}")]
+ [DataRow("{{PadRight:X:4}}")]
+ [DataRow("{{PadRight:X:400}}")]
+ [DataRow("{{PadRight:X:51}}")]
+ [TestMethod]
+ public void DescriptionWithinBounds(string value)
+ {
+ // arrange
+ _productDescription.Description = value.InterpretValue();
+ // act
+ var result = _validator.TestValidate(_productDescription);
+ //assert
+ result.ShouldNotHaveValidationErrorFor(m => m.Description);
+ }
+
+ [TestInitialize]
+ public void TestInitialize()
+ {
+ _fakeTimeProvider = new();
+ _fakeTimeProvider.SetUtcNow(new DateTimeOffset(new DateTime(2024, 8, 17, 12, 34, 56, DateTimeKind.Local)));
+ _productDescription = new ProductDescription()
+ {
+ Description = "12345",
+ ModifiedDate = _fakeTimeProvider.GetUtcNow().UtcDateTime,
+ ProductDescriptionId = 234,
+ Rowguid = 1.ToGuid(),
+ };
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/API/AdventureWorksDemo.Data/AdventureWorksDemo.Data.csproj b/src/API/AdventureWorksDemo.Data/AdventureWorksDemo.Data.csproj
index e10e50e..135c658 100644
--- a/src/API/AdventureWorksDemo.Data/AdventureWorksDemo.Data.csproj
+++ b/src/API/AdventureWorksDemo.Data/AdventureWorksDemo.Data.csproj
@@ -10,7 +10,7 @@
-
-
+
+
diff --git a/src/API/AdventureWorksDemo.Data/Paging/PagedList.cs b/src/API/AdventureWorksDemo.Data/Paging/PagedList.cs
index 7cd9d16..ed2c006 100644
--- a/src/API/AdventureWorksDemo.Data/Paging/PagedList.cs
+++ b/src/API/AdventureWorksDemo.Data/Paging/PagedList.cs
@@ -45,6 +45,13 @@ public static async Task> CreateAsync(IQueryable source, int pag
if (source == null)
return new PagedList([], 0, pageNumber, pageSize);
var count = await source.CountAsync();
+ var totalPages = (decimal)count % (decimal)pageSize;
+ if (pageNumber > totalPages)
+ {
+ var answer = Math.Ceiling(totalPages);
+ var debug = Math.Ceiling((decimal)25);
+ }
+
var items = await source.Skip((pageNumber - 1) * pageSize).Take(pageSize).ToListAsync();
return new PagedList(items ?? [], count, pageNumber, pageSize);
}
@@ -54,6 +61,7 @@ public class PageingFilter
{
private int _pageNumber = 1;
private int _pageSize = 25;
+ public string[]? Filter { get; set; } = null;
public int PageNumber
{
@@ -73,10 +81,19 @@ public int PageSize
{
_pageSize = (value > MaxPageSize) ? MaxPageSize : value;
if (_pageSize < 1)
- _pageNumber = 25;
+ _pageSize = 25;
}
}
+ public string[]? Sorting { get; set; } = null;
internal int MaxPageSize { get; set; } = 100;
+
+ internal void VerifyValues()
+ {
+ if (PageSize < 1)
+ PageSize = 25;
+ if (PageNumber < 1)
+ PageNumber = 1;
+ }
}
}
\ No newline at end of file
diff --git a/src/API/AdventureWorksDemo.Data/Services/BaseService.cs b/src/API/AdventureWorksDemo.Data/Services/BaseService.cs
index 4c2d471..a744a3c 100644
--- a/src/API/AdventureWorksDemo.Data/Services/BaseService.cs
+++ b/src/API/AdventureWorksDemo.Data/Services/BaseService.cs
@@ -82,6 +82,8 @@ public virtual async Task>> AddBatchAsync(IEn
public virtual async Task> FindAllAsync(PageingFilter paging,
Expression>? predicate)
{
+ paging.VerifyValues();
+
IQueryable? query = _repository.FindEntities(predicate);
if (query == null)
return [];
diff --git a/src/AdventureWorksDemo.sln b/src/AdventureWorksDemo.sln
index 58bd6a6..987c46f 100644
--- a/src/AdventureWorksDemo.sln
+++ b/src/AdventureWorksDemo.sln
@@ -13,8 +13,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdventureWorksDemo.Data.Tests.reqnroll", "API\AdventureWorksDemo.Data.Tests.reqnroll\AdventureWorksDemo.Data.Tests.reqnroll.csproj", "{3320669D-677E-4016-AD40-FDE03106809B}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdventureWorksDemo.Data.Tests.nUnit", "API\AdventureWorksDemo.Data.Tests.nUnit\AdventureWorksDemo.Data.Tests.nUnit.csproj", "{21A4B543-EC69-441F-A9FF-1EA9359ECA4C}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdventureWorksDemo.Common.Tests", "API\AdventureWorksDemo.Common.Tests\AdventureWorksDemo.Common.Tests.csproj", "{FFA1B5BA-6670-448E-8516-F01E9772F48E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdventureWorksDemo.API", "API\AdventureWorksDemo.API\AdventureWorksDemo.API.csproj", "{144FC8D9-C245-468B-90BB-A21917B42AD2}"
@@ -25,7 +23,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Backend", "Backend", "{1F79
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Frontend", "Frontend", "{B922BF81-0D47-41E8-BDC8-37C09BFA6167}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdventureWorksDemo.MudBlazor", "AdventureWorksDemo.MudBlazor\AdventureWorksDemo.MudBlazor.csproj", "{9D41FFEC-DE7B-4397-84CE-F6FFEE612AF2}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdventureWorksDemo.Common.Tests.Extensions", "API\AdventureWorksDemo.Common.Tests.Extensions\AdventureWorksDemo.Common.Tests.Extensions.csproj", "{8F4D9C82-7600-48A8-B8D0-19BF96DDE28C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdventureWorksDemo.Data.Tests", "API\AdventureWorksDemo.Data.Tests\AdventureWorksDemo.Data.Tests.csproj", "{AA4A04F0-04B2-46BF-917D-6B4E40CB56BF}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdventureWorksDemo.MudBlazor", "FrontEnd\AdventureWorksDemo.MudBlazor\AdventureWorksDemo.MudBlazor.csproj", "{C4D0ABE5-0E84-4112-B4C7-3067B23A2F26}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -41,10 +43,6 @@ Global
{3320669D-677E-4016-AD40-FDE03106809B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3320669D-677E-4016-AD40-FDE03106809B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3320669D-677E-4016-AD40-FDE03106809B}.Release|Any CPU.Build.0 = Release|Any CPU
- {21A4B543-EC69-441F-A9FF-1EA9359ECA4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {21A4B543-EC69-441F-A9FF-1EA9359ECA4C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {21A4B543-EC69-441F-A9FF-1EA9359ECA4C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {21A4B543-EC69-441F-A9FF-1EA9359ECA4C}.Release|Any CPU.Build.0 = Release|Any CPU
{FFA1B5BA-6670-448E-8516-F01E9772F48E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FFA1B5BA-6670-448E-8516-F01E9772F48E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FFA1B5BA-6670-448E-8516-F01E9772F48E}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -53,10 +51,18 @@ Global
{144FC8D9-C245-468B-90BB-A21917B42AD2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{144FC8D9-C245-468B-90BB-A21917B42AD2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{144FC8D9-C245-468B-90BB-A21917B42AD2}.Release|Any CPU.Build.0 = Release|Any CPU
- {9D41FFEC-DE7B-4397-84CE-F6FFEE612AF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {9D41FFEC-DE7B-4397-84CE-F6FFEE612AF2}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9D41FFEC-DE7B-4397-84CE-F6FFEE612AF2}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9D41FFEC-DE7B-4397-84CE-F6FFEE612AF2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8F4D9C82-7600-48A8-B8D0-19BF96DDE28C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8F4D9C82-7600-48A8-B8D0-19BF96DDE28C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8F4D9C82-7600-48A8-B8D0-19BF96DDE28C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8F4D9C82-7600-48A8-B8D0-19BF96DDE28C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AA4A04F0-04B2-46BF-917D-6B4E40CB56BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AA4A04F0-04B2-46BF-917D-6B4E40CB56BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AA4A04F0-04B2-46BF-917D-6B4E40CB56BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AA4A04F0-04B2-46BF-917D-6B4E40CB56BF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C4D0ABE5-0E84-4112-B4C7-3067B23A2F26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C4D0ABE5-0E84-4112-B4C7-3067B23A2F26}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C4D0ABE5-0E84-4112-B4C7-3067B23A2F26}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C4D0ABE5-0E84-4112-B4C7-3067B23A2F26}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -64,10 +70,11 @@ Global
GlobalSection(NestedProjects) = preSolution
{62101789-D3C8-4435-9174-3AD997CAC13C} = {1F7959F3-B8EC-43C1-BA68-47A80F511DA5}
{3320669D-677E-4016-AD40-FDE03106809B} = {9D6855CA-A743-45EC-BB4B-8BDE8A160DBD}
- {21A4B543-EC69-441F-A9FF-1EA9359ECA4C} = {9D6855CA-A743-45EC-BB4B-8BDE8A160DBD}
{FFA1B5BA-6670-448E-8516-F01E9772F48E} = {9D6855CA-A743-45EC-BB4B-8BDE8A160DBD}
{144FC8D9-C245-468B-90BB-A21917B42AD2} = {1F7959F3-B8EC-43C1-BA68-47A80F511DA5}
- {9D41FFEC-DE7B-4397-84CE-F6FFEE612AF2} = {B922BF81-0D47-41E8-BDC8-37C09BFA6167}
+ {8F4D9C82-7600-48A8-B8D0-19BF96DDE28C} = {9D6855CA-A743-45EC-BB4B-8BDE8A160DBD}
+ {AA4A04F0-04B2-46BF-917D-6B4E40CB56BF} = {9D6855CA-A743-45EC-BB4B-8BDE8A160DBD}
+ {C4D0ABE5-0E84-4112-B4C7-3067B23A2F26} = {B922BF81-0D47-41E8-BDC8-37C09BFA6167}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6B392A9A-E58C-44EB-BA80-051A0183B5DE}
diff --git a/src/AdventureWorksDemo.MudBlazor/AdventureWorksDemo.MudBlazor.csproj b/src/FrontEnd/AdventureWorksDemo.MudBlazor/AdventureWorksDemo.MudBlazor.csproj
similarity index 81%
rename from src/AdventureWorksDemo.MudBlazor/AdventureWorksDemo.MudBlazor.csproj
rename to src/FrontEnd/AdventureWorksDemo.MudBlazor/AdventureWorksDemo.MudBlazor.csproj
index aea3f8c..076480a 100644
--- a/src/AdventureWorksDemo.MudBlazor/AdventureWorksDemo.MudBlazor.csproj
+++ b/src/FrontEnd/AdventureWorksDemo.MudBlazor/AdventureWorksDemo.MudBlazor.csproj
@@ -8,7 +8,7 @@
-
-
+
+
diff --git a/src/AdventureWorksDemo.MudBlazor/Components/App.razor b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/App.razor
similarity index 100%
rename from src/AdventureWorksDemo.MudBlazor/Components/App.razor
rename to src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/App.razor
diff --git a/src/AdventureWorksDemo.MudBlazor/Components/Layout/MainLayout.razor b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Layout/MainLayout.razor
similarity index 100%
rename from src/AdventureWorksDemo.MudBlazor/Components/Layout/MainLayout.razor
rename to src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Layout/MainLayout.razor
diff --git a/src/AdventureWorksDemo.MudBlazor/Components/Layout/NavMenu.razor b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Layout/NavMenu.razor
similarity index 100%
rename from src/AdventureWorksDemo.MudBlazor/Components/Layout/NavMenu.razor
rename to src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Layout/NavMenu.razor
diff --git a/src/AdventureWorksDemo.MudBlazor/Components/Pages/Error.razor b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Pages/Error.razor
similarity index 100%
rename from src/AdventureWorksDemo.MudBlazor/Components/Pages/Error.razor
rename to src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Pages/Error.razor
diff --git a/src/AdventureWorksDemo.MudBlazor/Components/Pages/Home.razor b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Pages/Home.razor
similarity index 100%
rename from src/AdventureWorksDemo.MudBlazor/Components/Pages/Home.razor
rename to src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Pages/Home.razor
diff --git a/src/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor
similarity index 100%
rename from src/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor
rename to src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor
diff --git a/src/AdventureWorksDemo.MudBlazor/Components/Routes.razor b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Routes.razor
similarity index 100%
rename from src/AdventureWorksDemo.MudBlazor/Components/Routes.razor
rename to src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Routes.razor
diff --git a/src/AdventureWorksDemo.MudBlazor/Components/_Imports.razor b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/_Imports.razor
similarity index 100%
rename from src/AdventureWorksDemo.MudBlazor/Components/_Imports.razor
rename to src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/_Imports.razor
diff --git a/src/AdventureWorksDemo.MudBlazor/Models/PagedList.cs b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Models/PagedList.cs
similarity index 100%
rename from src/AdventureWorksDemo.MudBlazor/Models/PagedList.cs
rename to src/FrontEnd/AdventureWorksDemo.MudBlazor/Models/PagedList.cs
diff --git a/src/AdventureWorksDemo.MudBlazor/Models/ProductDescriptionModel.cs b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Models/ProductDescriptionModel.cs
similarity index 100%
rename from src/AdventureWorksDemo.MudBlazor/Models/ProductDescriptionModel.cs
rename to src/FrontEnd/AdventureWorksDemo.MudBlazor/Models/ProductDescriptionModel.cs
diff --git a/src/AdventureWorksDemo.MudBlazor/Program.cs b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Program.cs
similarity index 100%
rename from src/AdventureWorksDemo.MudBlazor/Program.cs
rename to src/FrontEnd/AdventureWorksDemo.MudBlazor/Program.cs
diff --git a/src/AdventureWorksDemo.MudBlazor/appsettings.Development.json b/src/FrontEnd/AdventureWorksDemo.MudBlazor/appsettings.Development.json
similarity index 100%
rename from src/AdventureWorksDemo.MudBlazor/appsettings.Development.json
rename to src/FrontEnd/AdventureWorksDemo.MudBlazor/appsettings.Development.json
diff --git a/src/AdventureWorksDemo.MudBlazor/appsettings.json b/src/FrontEnd/AdventureWorksDemo.MudBlazor/appsettings.json
similarity index 100%
rename from src/AdventureWorksDemo.MudBlazor/appsettings.json
rename to src/FrontEnd/AdventureWorksDemo.MudBlazor/appsettings.json
diff --git a/src/AdventureWorksDemo.MudBlazor/wwwroot/favicon.ico b/src/FrontEnd/AdventureWorksDemo.MudBlazor/wwwroot/favicon.ico
similarity index 100%
rename from src/AdventureWorksDemo.MudBlazor/wwwroot/favicon.ico
rename to src/FrontEnd/AdventureWorksDemo.MudBlazor/wwwroot/favicon.ico
From 9543d19bcf18a0bb829c1d99424317102f5c810b Mon Sep 17 00:00:00 2001
From: CodeTile <43536260+CodeTile@users.noreply.github.com>
Date: Tue, 28 Jan 2025 14:58:26 +0000
Subject: [PATCH 06/16] QueryExtensions.ApplySlice()
---
.../QueryExtensionsApplySliceTests.cs | 175 ++++++++++++++++++
.../AdventureWorksDemo.Data.csproj | 6 +-
.../Extentions/QueryExtensions.cs | 49 +++++
.../Paging/PagedList.cs | 40 ----
.../Paging/PageingFilter.cs | 44 +++++
5 files changed, 273 insertions(+), 41 deletions(-)
create mode 100644 src/API/AdventureWorksDemo.Data.Tests/Extentions/QueryExtensionsApplySliceTests.cs
create mode 100644 src/API/AdventureWorksDemo.Data/Extentions/QueryExtensions.cs
create mode 100644 src/API/AdventureWorksDemo.Data/Paging/PageingFilter.cs
diff --git a/src/API/AdventureWorksDemo.Data.Tests/Extentions/QueryExtensionsApplySliceTests.cs b/src/API/AdventureWorksDemo.Data.Tests/Extentions/QueryExtensionsApplySliceTests.cs
new file mode 100644
index 0000000..0c4e3bb
--- /dev/null
+++ b/src/API/AdventureWorksDemo.Data.Tests/Extentions/QueryExtensionsApplySliceTests.cs
@@ -0,0 +1,175 @@
+using AdventureWorksDemo.Data.Paging;
+using AdventureWorksDemo.Data.QueryExtentions;
+
+namespace AdventureWorksDemo.Data.Tests.Extentions
+{
+ [TestClass]
+ public class QueryExtensionsApplySliceTests
+ {
+ private readonly List _data = ["A1", "A2", "A3", "A4", "A5", "B1", "B2", "B3", "B4", "B5", "C1", "C2", "C3", "C4", "C5"];
+
+ [TestMethod]
+ public void ApplySlice_EmptyQuery_ReturnsDefault()
+ {
+ // Arrange
+ var query = Enumerable.Empty().AsQueryable();
+
+ // Act
+ var result = query.ApplySlice(0, 10);
+
+ // Assert
+ Assert.IsNull(result);
+ }
+
+ [TestMethod]
+ public void ApplySlice_EmptyQuery_ReturnsDefault_WithPageingFilter()
+ {
+ // Arrange
+ var query = Enumerable.Empty().AsQueryable();
+
+ // Act
+ var result = query.ApplySlice(new PageingFilter());
+
+ // Assert
+ Assert.IsNull(result);
+ }
+
+ [TestMethod]
+ public void ApplySlice_NegativeSkipOrPageSize_ReturnsOriginalQuery()
+ {
+ // Arrange
+ var query = _data.AsQueryable();
+
+ // Act
+ var resultNegativeSkip = query.ApplySlice(-1, 2);
+ var resultNegativePageSize = query.ApplySlice(1, -2);
+
+ // Assert
+ CollectionAssert.AreEqual(query.ToList(), resultNegativeSkip.ToList());
+ CollectionAssert.AreEqual(query.ToList(), resultNegativePageSize.ToList());
+ }
+
+ [TestMethod]
+ public void ApplySlice_NegativeSkipOrPageSize_ReturnsOriginalQuery_WithPageingFilter()
+ {
+ // Arrange
+ var query = _data.AsQueryable();
+ var filterNegativeSkip = new PageingFilter() { PageNumber = -1, PageSize = 2 };
+ var filterNegativePageSize = new PageingFilter() { PageNumber = 1, PageSize = -2 };
+ // Act
+ var resultNegativeSkip = query.ApplySlice(filterNegativeSkip);
+ var resultNegativePageSize = query.ApplySlice(filterNegativePageSize);
+
+ // Assert
+ CollectionAssert.AreEqual(_data[0..2], resultNegativeSkip.ToList());
+ CollectionAssert.AreEqual(_data, resultNegativePageSize.ToList());
+ }
+
+ [TestMethod]
+ public void ApplySlice_NullQuery_ReturnsDefault()
+ {
+ // Arrange
+ IQueryable? query = null;
+
+ // Act
+ var result = query!.ApplySlice(0, 10);
+
+ // Assert
+ Assert.IsNull(result);
+ }
+
+ [TestMethod]
+ public void ApplySlice_NullQuery_ReturnsDefault_WithPageingFilter()
+ {
+ // Arrange
+ IQueryable? query = null;
+ var filter = new PageingFilter() { PageNumber = 1, PageSize = 5 };
+ // Act
+ var result = query!.ApplySlice(filter);
+
+ // Assert
+ Assert.IsNull(result);
+ }
+
+ [TestMethod]
+ public void ApplySlice_PageSizeGreaterThanRemaining_ReturnsRemainingElements()
+ {
+ // Arrange
+ var query = _data.AsQueryable();
+
+ // Act
+ var result = query.ApplySlice(2, 100);
+
+ // Assert
+ CollectionAssert.AreEqual(_data[2..15], result.ToList());
+ }
+
+ [TestMethod]
+ public void ApplySlice_PageSizeGreaterThanRemaining_ReturnsRemainingElements_WithPagingFilter()
+ {
+ // Arrange
+ var query = _data.AsQueryable();
+ var filter = new PageingFilter() { PageNumber = 2, PageSize = 100 };
+ // Act
+ var result = query.ApplySlice(filter);
+
+ // Assert
+ CollectionAssert.AreEqual(_data[15..15], result.ToList());
+ }
+
+ [TestMethod]
+ public void ApplySlice_SkipBeyondCount_ReturnsEmpty()
+ {
+ // Arrange
+ var query = _data.AsQueryable();
+
+ // Act
+ var result = query.ApplySlice(20, 2);
+
+ // Assert
+ Assert.AreEqual(0, result.Count());
+ }
+
+ [TestMethod]
+ public void ApplySlice_SkipBeyondCount_ReturnsEmpty_WithPageingFilter()
+ {
+ // Arrange
+ var query = _data.AsQueryable();
+ var filter = new PageingFilter() { PageNumber = 20, PageSize = 2 };
+
+ // Act
+ var result = query.ApplySlice(filter);
+
+ // Assert
+ Assert.AreEqual(0, result.Count());
+ }
+
+ [TestMethod]
+ public void ApplySlice_ValidQueryWithSlicing_ReturnsExpectedSlice()
+ {
+ // Arrange
+ var query = _data.AsQueryable();
+
+ // Act
+ var result = query.ApplySlice(1, 2);
+
+ // Assert
+ CollectionAssert.AreEqual(_data[1..3], result.ToList());
+ }
+
+ [DataRow(1, 2, 0, 2)]
+ [DataRow(1, 10, 0, 10)]
+ [TestMethod]
+ public void ApplySlice_ValidQueryWithSlicing_ReturnsExpectedSlice_WithPageingFilter(int pageNumber, int pageSize, int dataStart, int dataEnd)
+ {
+ // Arrange
+ var query = _data.AsQueryable();
+ var filter = new PageingFilter() { PageNumber = pageNumber, PageSize = pageSize };
+ // Act
+ var result = query.ApplySlice(filter);
+
+ // Assert
+ CollectionAssert.AreEqual(_data[dataStart..dataEnd], result.ToList());
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/API/AdventureWorksDemo.Data/AdventureWorksDemo.Data.csproj b/src/API/AdventureWorksDemo.Data/AdventureWorksDemo.Data.csproj
index 135c658..f2fca96 100644
--- a/src/API/AdventureWorksDemo.Data/AdventureWorksDemo.Data.csproj
+++ b/src/API/AdventureWorksDemo.Data/AdventureWorksDemo.Data.csproj
@@ -1,5 +1,9 @@
-
+
+
+ <_Parameter1>$(MSBuildProjectName).Tests
+
+ net9.0enable
diff --git a/src/API/AdventureWorksDemo.Data/Extentions/QueryExtensions.cs b/src/API/AdventureWorksDemo.Data/Extentions/QueryExtensions.cs
new file mode 100644
index 0000000..8f903bf
--- /dev/null
+++ b/src/API/AdventureWorksDemo.Data/Extentions/QueryExtensions.cs
@@ -0,0 +1,49 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using AdventureWorksDemo.Data.Paging;
+
+using static Azure.Core.HttpHeader;
+
+namespace AdventureWorksDemo.Data.QueryExtentions
+{
+ public static class QueryExtensions
+ {
+ public static IQueryable ApplyQuery(this IQueryable query, PageingFilter? filter) where T : class
+ {
+ if (filter == null)
+ return query;
+ if (query == null || !query.Any())
+ return default!;
+
+ filter.VerifyValues();
+
+ return query.ApplySlice(filter);
+ }
+
+ public static IQueryable ApplySlice(this IQueryable query, PageingFilter? filter) where T : class
+ {
+ if (filter == null)
+ return query;
+ if (query == null || !query.Any())
+ return default!;
+ return ApplySlice(query, filter.Skip, filter.PageSize);
+ }
+
+ internal static IQueryable ApplySlice(this IQueryable query, int skip, int pageSize) where T : class
+ {
+ if (query == null || !query.Any())
+ return default!;
+ if (skip < 0 || pageSize < 0)
+ return query;
+
+ // //
+ return query
+ .Skip(skip)
+ .Take(pageSize);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/API/AdventureWorksDemo.Data/Paging/PagedList.cs b/src/API/AdventureWorksDemo.Data/Paging/PagedList.cs
index ed2c006..2743963 100644
--- a/src/API/AdventureWorksDemo.Data/Paging/PagedList.cs
+++ b/src/API/AdventureWorksDemo.Data/Paging/PagedList.cs
@@ -56,44 +56,4 @@ public static async Task> CreateAsync(IQueryable source, int pag
return new PagedList(items ?? [], count, pageNumber, pageSize);
}
}
-
- public class PageingFilter
- {
- private int _pageNumber = 1;
- private int _pageSize = 25;
- public string[]? Filter { get; set; } = null;
-
- public int PageNumber
- {
- get => _pageNumber;
- set
- {
- _pageNumber = value;
- if (value < 1)
- _pageNumber = 1;
- }
- }
-
- public int PageSize
- {
- get => _pageSize;
- set
- {
- _pageSize = (value > MaxPageSize) ? MaxPageSize : value;
- if (_pageSize < 1)
- _pageSize = 25;
- }
- }
-
- public string[]? Sorting { get; set; } = null;
- internal int MaxPageSize { get; set; } = 100;
-
- internal void VerifyValues()
- {
- if (PageSize < 1)
- PageSize = 25;
- if (PageNumber < 1)
- PageNumber = 1;
- }
- }
}
\ No newline at end of file
diff --git a/src/API/AdventureWorksDemo.Data/Paging/PageingFilter.cs b/src/API/AdventureWorksDemo.Data/Paging/PageingFilter.cs
new file mode 100644
index 0000000..c52525a
--- /dev/null
+++ b/src/API/AdventureWorksDemo.Data/Paging/PageingFilter.cs
@@ -0,0 +1,44 @@
+namespace AdventureWorksDemo.Data.Paging
+{
+ public class PageingFilter
+ {
+ private int _pageNumber = 1;
+ private int _pageSize = 25;
+ public string[]? Filter { get; set; } = null;
+
+ public int PageNumber
+ {
+ get => _pageNumber;
+ set
+ {
+ _pageNumber = value;
+ if (value < 1)
+ _pageNumber = 1;
+ }
+ }
+
+ public int PageSize
+ {
+ get => _pageSize;
+ set
+ {
+ _pageSize = (value > MaxPageSize) ? MaxPageSize : value;
+ if (_pageSize < 1)
+ _pageSize = 25;
+ }
+ }
+
+ public int Skip
+ { get { return (PageNumber - 1) * PageSize; } }
+ public string[]? Sorting { get; set; } = null;
+ internal int MaxPageSize { get; set; } = 100;
+
+ internal void VerifyValues()
+ {
+ if (PageSize < 1)
+ PageSize = 25;
+ if (PageNumber < 1)
+ PageNumber = 1;
+ }
+ }
+}
\ No newline at end of file
From 832a6506ce94cf8f72ceeb667b745c3a0af8fbcd Mon Sep 17 00:00:00 2001
From: CodeTile <43536260+CodeTile@users.noreply.github.com>
Date: Wed, 29 Jan 2025 10:03:44 +0000
Subject: [PATCH 07/16] Add PagingFilter Tests
---
.../Pageing/PagingFilterTests.cs | 63 +++++++++++++++++++
.../Paging/PagedList.cs | 1 -
2 files changed, 63 insertions(+), 1 deletion(-)
create mode 100644 src/API/AdventureWorksDemo.Data.Tests/Pageing/PagingFilterTests.cs
diff --git a/src/API/AdventureWorksDemo.Data.Tests/Pageing/PagingFilterTests.cs b/src/API/AdventureWorksDemo.Data.Tests/Pageing/PagingFilterTests.cs
new file mode 100644
index 0000000..041f866
--- /dev/null
+++ b/src/API/AdventureWorksDemo.Data.Tests/Pageing/PagingFilterTests.cs
@@ -0,0 +1,63 @@
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using AdventureWorksDemo.Data.Paging;
+
+namespace AdventureWorksDemo.Tests.Data.Paging
+{
+ [TestClass]
+ public class PagingFilterTests
+ {
+ [TestMethod]
+ public void PageNumber_SetNegativeValue_ResetsToOne()
+ {
+ // Arrange
+ var filter = new PageingFilter { PageNumber = -5 };
+
+ // Assert
+ Assert.AreEqual(1, filter.PageNumber);
+ }
+
+ [TestMethod]
+ public void PageSize_SetNegativeValue_ResetsToDefault()
+ {
+ // Arrange
+ var filter = new PageingFilter { PageSize = -10 };
+
+ // Assert
+ Assert.AreEqual(25, filter.PageSize);
+ }
+
+ [TestMethod]
+ public void PageSize_SetValueAboveMax_SetsToMaxPageSize()
+ {
+ // Arrange
+ var filter = new PageingFilter { PageSize = 150 };
+
+ // Assert
+ Assert.AreEqual(100, filter.PageSize);
+ }
+
+ [TestMethod]
+ public void Skip_CalculatesCorrectly()
+ {
+ // Arrange
+ var filter = new PageingFilter { PageNumber = 3, PageSize = 20 };
+
+ // Assert
+ Assert.AreEqual(40, filter.Skip);
+ }
+
+ [TestMethod]
+ public void VerifyValues_ResetsInvalidValues()
+ {
+ // Arrange
+ var filter = new PageingFilter { PageNumber = 0, PageSize = 0 };
+
+ // Act
+ filter.VerifyValues();
+
+ // Assert
+ Assert.AreEqual(1, filter.PageNumber);
+ Assert.AreEqual(25, filter.PageSize);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/API/AdventureWorksDemo.Data/Paging/PagedList.cs b/src/API/AdventureWorksDemo.Data/Paging/PagedList.cs
index 2743963..b203b6c 100644
--- a/src/API/AdventureWorksDemo.Data/Paging/PagedList.cs
+++ b/src/API/AdventureWorksDemo.Data/Paging/PagedList.cs
@@ -49,7 +49,6 @@ public static async Task> CreateAsync(IQueryable source, int pag
if (pageNumber > totalPages)
{
var answer = Math.Ceiling(totalPages);
- var debug = Math.Ceiling((decimal)25);
}
var items = await source.Skip((pageNumber - 1) * pageSize).Take(pageSize).ToListAsync();
From 17abf51765e3405ec58d70dea261938c49992cc9 Mon Sep 17 00:00:00 2001
From: CodeTile <43536260+CodeTile@users.noreply.github.com>
Date: Wed, 29 Jan 2025 11:06:02 +0000
Subject: [PATCH 08/16] Tests for multiple Sort direction change on
ProductDescriptionPage
---
.../StringExtensions.cs | 1 +
.../AddressServiceFindTests.feature | 89 +-
...ionServiceFindAllAsyncSortingTests.feature | 347 ++++
...scriptionServiceFindAllAsyncTests.feature} | 245 ++-
...ProductDescriptionServiceFindTests.feature | 40 +
.../ProductCategoryServiceAddTests.feature.cs | 272 +--
...oductCategoryServiceDeleteTests.feature.cs | 62 +-
.../ProductCategoryServiceFindTests.feature | 289 ++-
...ProductCategoryServiceFindTests.feature.cs | 1773 +++++++++++++----
...oductCategoryServiceUpdateTests.feature.cs | 266 +--
.../Helpers/HelperScenarioContext.cs | 24 +-
.../Helpers/HelperTypes.cs | 6 +
.../StepDefinitions/StepDefinitions.cs | 75 +-
.../QueryExtensionsApplySliceTests.cs | 142 +-
.../Pageing/PagingFilterTests.cs | 26 +-
.../Extentions/IQueryableExtensionsPaging.cs | 63 +
.../Extentions/QueryExtensions.cs | 49 -
.../Paging/PagedList.cs | 36 +-
.../Paging/PageingFilter.cs | 15 +-
.../Services/BaseService.cs | 14 +-
.../Components/Pages/ProductDescription.razor | 40 +-
.../Models/PagedList.cs | 7 +-
22 files changed, 2820 insertions(+), 1061 deletions(-)
rename src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/AddressService/{ => Find}/AddressServiceFindTests.feature (80%)
create mode 100644 src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/Find/ProductDescriptionServiceFindAllAsyncSortingTests.feature
rename src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/{ProductDescriptionServiceFindTests.feature => Find/ProductDescriptionServiceFindAllAsyncTests.feature} (57%)
create mode 100644 src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/Find/ProductDescriptionServiceFindTests.feature
create mode 100644 src/API/AdventureWorksDemo.Data/Extentions/IQueryableExtensionsPaging.cs
delete mode 100644 src/API/AdventureWorksDemo.Data/Extentions/QueryExtensions.cs
diff --git a/src/API/AdventureWorksDemo.Common.Tests.Extensions/StringExtensions.cs b/src/API/AdventureWorksDemo.Common.Tests.Extensions/StringExtensions.cs
index de8aa07..87a30fb 100644
--- a/src/API/AdventureWorksDemo.Common.Tests.Extensions/StringExtensions.cs
+++ b/src/API/AdventureWorksDemo.Common.Tests.Extensions/StringExtensions.cs
@@ -47,6 +47,7 @@ public static string InterpretValue(this string value)
var replacementText = character.PadRight(iterations, Convert.ToChar(character));
value = value.Replace(textToReplace, replacementText);
}
+
return value;
}
}
diff --git a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/AddressService/AddressServiceFindTests.feature b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/AddressService/Find/AddressServiceFindTests.feature
similarity index 80%
rename from src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/AddressService/AddressServiceFindTests.feature
rename to src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/AddressService/Find/AddressServiceFindTests.feature
index ceee957..f77d7ca 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/AddressService/AddressServiceFindTests.feature
+++ b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/AddressService/Find/AddressServiceFindTests.feature
@@ -11,7 +11,7 @@ Background:
Scenario: FindAllAsync_1_5
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
| PageNumber | PageSize |
- | 1 | 5 |
+ | 0 | 5 |
And I call the method 'FindAllAsync' with the parameter values
| Key | Value | TypeName |
| pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
@@ -19,9 +19,9 @@ Scenario: FindAllAsync_1_5
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage |
- | 2 | 8 | 5 | 1 |
- And the results are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 2 | 8 | 5 | 0 |
+ And the sorted results are
| AddressId | ModifiedDate | Rowguid | AddressLine1 | AddressLine2 | City | CountryRegion | PostalCode | StateProvince |
| 640 | 9/1/2007 12:00:00 AM | 0e4ac5bb-be0d-4a96-a58e-064daec08e1a | 251 The Metro Center | | Wokingham | United Kingdom | RG41 1QW | England |
| 652 | 9/1/2006 12:00:00 AM | 54e20963-b0e9-41cf-ab7e-d50459a3325c | Wymbush | | Milton Keynes | United Kingdom | MK8 8DF | England |
@@ -34,7 +34,7 @@ Scenario: FindAllAsync_1_5
Scenario: FindAllAsync_1_500
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
| PageNumber | PageSize |
- | 1 | 500 |
+ | 0 | 500 |
And I call the method 'FindAllAsync' with the parameter values
| Key | Value | TypeName |
| pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
@@ -42,9 +42,9 @@ Scenario: FindAllAsync_1_500
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage |
- | 1 | 8 | 100 | 1 |
- And the results are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 1 | 8 | 100 | 0 |
+ And the sorted results are
| AddressId | ModifiedDate | Rowguid | AddressLine1 | AddressLine2 | City | CountryRegion | PostalCode | StateProvince |
| 640 | 9/1/2007 12:00:00 AM | 0e4ac5bb-be0d-4a96-a58e-064daec08e1a | 251 The Metro Center | | Wokingham | United Kingdom | RG41 1QW | England |
| 652 | 9/1/2006 12:00:00 AM | 54e20963-b0e9-41cf-ab7e-d50459a3325c | Wymbush | | Milton Keynes | United Kingdom | MK8 8DF | England |
@@ -58,7 +58,7 @@ Scenario: FindAllAsync_1_500
Scenario: FindAllAsync_2_5
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
| PageNumber | PageSize |
- | 2 | 5 |
+ | 3 | 5 |
And I call the method 'FindAllAsync' with the parameter values
| Key | Value | TypeName |
| pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
@@ -66,9 +66,10 @@ Scenario: FindAllAsync_2_5
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage |
- | 2 | 8 | 5 | 2 |
- And the results are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 2 | 8 | 5 | 1 |
+
+ And the sorted results are
| AddressId | ModifiedDate | Rowguid | AddressLine1 | AddressLine2 | City | CountryRegion | PostalCode | StateProvince |
| 1090 | 9/1/2007 12:00:00 AM | cf3ae92a-3e66-4af0-b683-731826e89cd1 | 25130 South State Street | | Sandy | United States | 84070 | Utah |
| 1092 | 9/1/2006 12:00:00 AM | 79cdd89c-3c91-48db-8277-46d04aad7251 | 99700 Bell Road | | Auburn | United States | 95603 | California |
@@ -85,9 +86,9 @@ Scenario: FindAllAsync_2_8
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage |
- | 1 | 8 | 8 | 2 |
- And the results are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 1 | 8 | 8 | 1 |
+ And the sorted results are
| AddressId | ModifiedDate | Rowguid | AddressLine1 | AddressLine2 | City | CountryRegion | PostalCode | StateProvince |
Scenario: FindAllAsync_20_20
@@ -101,9 +102,9 @@ Scenario: FindAllAsync_20_20
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage |
- | 1 | 8 | 8 | 2 |
- And the results are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 1 | 8 | 8 | 1 |
+ And the sorted results are
| AddressId | ModifiedDate | Rowguid | AddressLine1 | AddressLine2 | City | CountryRegion | PostalCode | StateProvince |
Scenario: FindAllAsync_1234_5
@@ -117,10 +118,13 @@ Scenario: FindAllAsync_1234_5
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage |
- | 2 | 8 | 5 | 1234 |
- And the results are
- | AddressId | ModifiedDate | Rowguid | AddressLine1 | AddressLine2 | City | CountryRegion | PostalCode | StateProvince |
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 2 | 8 | 5 | 1 |
+ And the sorted results are
+ | AddressId | ModifiedDate | Rowguid | AddressLine1 | AddressLine2 | City | CountryRegion | PostalCode | StateProvince |
+ | 1090 | 9/1/2007 12:00:00 AM | cf3ae92a-3e66-4af0-b683-731826e89cd1 | 25130 South State Street | | Sandy | United States | 84070 | Utah |
+ | 1092 | 9/1/2006 12:00:00 AM | 79cdd89c-3c91-48db-8277-46d04aad7251 | 99700 Bell Road | | Auburn | United States | 95603 | California |
+ | 1111 | 9/1/2006 12:00:00 AM | 00000000-1111-2222-0000-000000000001 | Orphan Record | | Use In Delete Tests | United States | 95603 | California |
Scenario: FindAllAsync_0_0
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
@@ -135,8 +139,8 @@ Scenario: FindAllAsync_0_0
And the PagedList values are
| TotalPages | TotalCount | PageSize | CurrentPage |
- | 1 | 8 | 25 | 1 |
- And the results are
+ | 1 | 8 | 25 | 0 |
+ And the sorted results are
| AddressId | ModifiedDate | Rowguid | AddressLine1 | AddressLine2 | City | CountryRegion | PostalCode | StateProvince |
| 640 | 9/1/2007 12:00:00 AM | 0e4ac5bb-be0d-4a96-a58e-064daec08e1a | 251 The Metro Center | | Wokingham | United Kingdom | RG41 1QW | England |
| 652 | 9/1/2006 12:00:00 AM | 54e20963-b0e9-41cf-ab7e-d50459a3325c | Wymbush | | Milton Keynes | United Kingdom | MK8 8DF | England |
@@ -159,16 +163,15 @@ Scenario: FindAllAsync_0_5
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
| TotalPages | TotalCount | PageSize | CurrentPage |
- | 2 | 8 | 5 | 1 |
- And the results are
- | AddressId | ModifiedDate | Rowguid | AddressLine1 | AddressLine2 | City | CountryRegion | PostalCode | StateProvince |
- | 640 | 9/1/2007 12:00:00 AM | 0e4ac5bb-be0d-4a96-a58e-064daec08e1a | 251 The Metro Center | | Wokingham | United Kingdom | RG41 1QW | England |
- | 652 | 9/1/2006 12:00:00 AM | 54e20963-b0e9-41cf-ab7e-d50459a3325c | Wymbush | | Milton Keynes | United Kingdom | MK8 8DF | England |
- | 669 | 12/1/2006 12:00:00 AM | 56baec2a-5cc5-4a90-bef9-ee57e82f2e69 | Internet House, 3399 Science Park | | Cambridge | United Kingdom | CB4 4BZ | England |
- | 1034 | 9/1/2007 12:00:00 AM | 300d2a6e-67b4-417b-83a9-2026818a21c6 | Oxnard Outlet | | Oxnard | United States | 93030 | California |
- | 1038 | 9/1/2007 12:00:00 AM | a86c8140-ad7d-4caa-9b40-4006bd9998e2 | 123 Camelia Avenue | | Oxnard | United States | 93030 | California |
-
-
+ | 2 | 8 | 5 | 0 |
+ And the sorted results are
+ | AddressId | ModifiedDate | Rowguid | AddressLine1 | AddressLine2 | City | CountryRegion | PostalCode | StateProvince |
+ | 640 | 9/1/2007 12:00:00 AM | 0e4ac5bb-be0d-4a96-a58e-064daec08e1a | 251 The Metro Center | | Wokingham | United Kingdom | RG41 1QW | England |
+ | 652 | 9/1/2006 12:00:00 AM | 54e20963-b0e9-41cf-ab7e-d50459a3325c | Wymbush | | Milton Keynes | United Kingdom | MK8 8DF | England |
+ | 669 | 12/1/2006 12:00:00 AM | 56baec2a-5cc5-4a90-bef9-ee57e82f2e69 | Internet House, 3399 Science Park | | Cambridge | United Kingdom | CB4 4BZ | England |
+ | 1034 | 9/1/2007 12:00:00 AM | 300d2a6e-67b4-417b-83a9-2026818a21c6 | Oxnard Outlet | | Oxnard | United States | 93030 | California |
+ | 1038 | 9/1/2007 12:00:00 AM | a86c8140-ad7d-4caa-9b40-4006bd9998e2 | 123 Camelia Avenue | | Oxnard | United States | 93030 | California |
+
Scenario: FindAllAsync_5_0
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
@@ -178,15 +181,23 @@ Scenario: FindAllAsync_5_0
| Key | Value | TypeName |
| pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
Then the result is of type
- | Expected |
+ | Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
| TotalPages | TotalCount | PageSize | CurrentPage |
- | 1 | 8 | 25 | 5 |
-
- And the results are
+ | 1 | 8 | 25 | 0 |
+ And the sorted results are
| AddressId | ModifiedDate | Rowguid | AddressLine1 | AddressLine2 | City | CountryRegion | PostalCode | StateProvince |
-
+ | 640 | 9/1/2007 12:00:00 AM | 0e4ac5bb-be0d-4a96-a58e-064daec08e1a | 251 The Metro Center | | Wokingham | United Kingdom | RG41 1QW | England |
+ | 652 | 9/1/2006 12:00:00 AM | 54e20963-b0e9-41cf-ab7e-d50459a3325c | Wymbush | | Milton Keynes | United Kingdom | MK8 8DF | England |
+ | 669 | 12/1/2006 12:00:00 AM | 56baec2a-5cc5-4a90-bef9-ee57e82f2e69 | Internet House, 3399 Science Park | | Cambridge | United Kingdom | CB4 4BZ | England |
+ | 1034 | 9/1/2007 12:00:00 AM | 300d2a6e-67b4-417b-83a9-2026818a21c6 | Oxnard Outlet | | Oxnard | United States | 93030 | California |
+ | 1038 | 9/1/2007 12:00:00 AM | a86c8140-ad7d-4caa-9b40-4006bd9998e2 | 123 Camelia Avenue | | Oxnard | United States | 93030 | California |
+ | 1090 | 9/1/2007 12:00:00 AM | cf3ae92a-3e66-4af0-b683-731826e89cd1 | 25130 South State Street | | Sandy | United States | 84070 | Utah |
+ | 1092 | 9/1/2006 12:00:00 AM | 79cdd89c-3c91-48db-8277-46d04aad7251 | 99700 Bell Road | | Auburn | United States | 95603 | California |
+ | 1111 | 9/1/2006 12:00:00 AM | 00000000-1111-2222-0000-000000000001 | Orphan Record | | Use In Delete Tests | United States | 95603 | California |
+
+
Scenario: FindAsync1090
When I call the method 'FindAsync' with the parameter values
| Key | Value | TypeName |
diff --git a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/Find/ProductDescriptionServiceFindAllAsyncSortingTests.feature b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/Find/ProductDescriptionServiceFindAllAsyncSortingTests.feature
new file mode 100644
index 0000000..4416b5b
--- /dev/null
+++ b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/Find/ProductDescriptionServiceFindAllAsyncSortingTests.feature
@@ -0,0 +1,347 @@
+Feature: ProductDescriptionServiceFindAllAsyncSortingTests
+
+System tests for the ProductDescriptionService
+Testing the methods FindAllAsync with sorting
+
+Background:
+ Given The service to test is 'AdventureWorksDemo.Data.Services.IProductDescriptionService'
+
+Scenario: FindAllAsync_0_5_Description3TimesTheSameDefault
+
+ When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
+ | PageNumber | PageSize | Sorting |
+ | 0 | 5 | Description |
+ And I call the method 'FindAllAsync' with the parameter values
+ | Key | Value | TypeName |
+ | pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 8 | 37 | 5 | 0 |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 1487 | 6/1/2007 12:00:00 AM | 5c1dab3a-4b31-4d9d-a14f-3cb61949b79b | Adapt� � tous les usages, sur route ou tout-terrain. Pour toutes les bourses. Changement de braquet en douceur et conduite confortable. |
+ | 513 | 6/1/2007 12:00:00 AM | 741eae59-5e59-4dbc-9086-2633392c2582 | All-occasion value bike with our basic comfort and safety features. Offers wider, more stable tires for a ride around town or weekend trip. |
+ | 627 | 6/1/2007 12:00:00 AM | ebf2f0a4-89f2-4d31-be48-d8fd278f3024 | All-weather brake pads; provides superior stopping by applying more surface to the rim. |
+ | 1488 | 6/1/2007 12:00:00 AM | 79065ec8-2080-4120-a4ea-bfa7ea1f1f9d | Ce v�lo offre un excellent rapport qualit�-prix. Vif et facile � man�uvrer, il se conduit en toute tranquillit� sur les chemins et les sentiers. |
+ | 1605 | 6/1/2007 12:00:00 AM | 9cfed570-180a-44ea-8233-55116a0ddcb9 | Chaque cadre est fabriqu� artisanalement dans notre atelier de Bordeaux afin d'obtenir le diam�tre et l'�paisseur adapt�s � un v�lo tout-terrain de premier choix. Le cadre en aluminium soud� � chaud pr�sente un tube d'un plus grand diam�tre, afin d'absorber les bosses. |
+
+ Given I clear the previous results
+ When I update the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
+ | PageNumber | PageSize | Sorting |
+ | 0 | 5 | Description |
+ And I call the method 'FindAllAsync' with the parameter values
+ | Key | Value | TypeName |
+ | pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 8 | 37 | 5 | 0 |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 1487 | 6/1/2007 12:00:00 AM | 5c1dab3a-4b31-4d9d-a14f-3cb61949b79b | Adapt� � tous les usages, sur route ou tout-terrain. Pour toutes les bourses. Changement de braquet en douceur et conduite confortable. |
+ | 513 | 6/1/2007 12:00:00 AM | 741eae59-5e59-4dbc-9086-2633392c2582 | All-occasion value bike with our basic comfort and safety features. Offers wider, more stable tires for a ride around town or weekend trip. |
+ | 627 | 6/1/2007 12:00:00 AM | ebf2f0a4-89f2-4d31-be48-d8fd278f3024 | All-weather brake pads; provides superior stopping by applying more surface to the rim. |
+ | 1488 | 6/1/2007 12:00:00 AM | 79065ec8-2080-4120-a4ea-bfa7ea1f1f9d | Ce v�lo offre un excellent rapport qualit�-prix. Vif et facile � man�uvrer, il se conduit en toute tranquillit� sur les chemins et les sentiers. |
+ | 1605 | 6/1/2007 12:00:00 AM | 9cfed570-180a-44ea-8233-55116a0ddcb9 | Chaque cadre est fabriqu� artisanalement dans notre atelier de Bordeaux afin d'obtenir le diam�tre et l'�paisseur adapt�s � un v�lo tout-terrain de premier choix. Le cadre en aluminium soud� � chaud pr�sente un tube d'un plus grand diam�tre, afin d'absorber les bosses. |
+
+ Given I clear the previous results
+ When I update the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
+ | PageNumber | PageSize | Sorting |
+ | 0 | 5 | Description |
+ And I call the method 'FindAllAsync' with the parameter values
+ | Key | Value | TypeName |
+ | pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 8 | 37 | 5 | 0 |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 1487 | 6/1/2007 12:00:00 AM | 5c1dab3a-4b31-4d9d-a14f-3cb61949b79b | Adapt� � tous les usages, sur route ou tout-terrain. Pour toutes les bourses. Changement de braquet en douceur et conduite confortable. |
+ | 513 | 6/1/2007 12:00:00 AM | 741eae59-5e59-4dbc-9086-2633392c2582 | All-occasion value bike with our basic comfort and safety features. Offers wider, more stable tires for a ride around town or weekend trip. |
+ | 627 | 6/1/2007 12:00:00 AM | ebf2f0a4-89f2-4d31-be48-d8fd278f3024 | All-weather brake pads; provides superior stopping by applying more surface to the rim. |
+ | 1488 | 6/1/2007 12:00:00 AM | 79065ec8-2080-4120-a4ea-bfa7ea1f1f9d | Ce v�lo offre un excellent rapport qualit�-prix. Vif et facile � man�uvrer, il se conduit en toute tranquillit� sur les chemins et les sentiers. |
+ | 1605 | 6/1/2007 12:00:00 AM | 9cfed570-180a-44ea-8233-55116a0ddcb9 | Chaque cadre est fabriqu� artisanalement dans notre atelier de Bordeaux afin d'obtenir le diam�tre et l'�paisseur adapt�s � un v�lo tout-terrain de premier choix. Le cadre en aluminium soud� � chaud pr�sente un tube d'un plus grand diam�tre, afin d'absorber les bosses. |
+
+Scenario: FindAllAsync_0_5_Description3TimesTheSameAscending
+
+ When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
+ | PageNumber | PageSize | Sorting |
+ | 0 | 5 | Description ASC |
+ And I call the method 'FindAllAsync' with the parameter values
+ | Key | Value | TypeName |
+ | pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 8 | 37 | 5 | 0 |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 1487 | 6/1/2007 12:00:00 AM | 5c1dab3a-4b31-4d9d-a14f-3cb61949b79b | Adapt� � tous les usages, sur route ou tout-terrain. Pour toutes les bourses. Changement de braquet en douceur et conduite confortable. |
+ | 513 | 6/1/2007 12:00:00 AM | 741eae59-5e59-4dbc-9086-2633392c2582 | All-occasion value bike with our basic comfort and safety features. Offers wider, more stable tires for a ride around town or weekend trip. |
+ | 627 | 6/1/2007 12:00:00 AM | ebf2f0a4-89f2-4d31-be48-d8fd278f3024 | All-weather brake pads; provides superior stopping by applying more surface to the rim. |
+ | 1488 | 6/1/2007 12:00:00 AM | 79065ec8-2080-4120-a4ea-bfa7ea1f1f9d | Ce v�lo offre un excellent rapport qualit�-prix. Vif et facile � man�uvrer, il se conduit en toute tranquillit� sur les chemins et les sentiers. |
+ | 1605 | 6/1/2007 12:00:00 AM | 9cfed570-180a-44ea-8233-55116a0ddcb9 | Chaque cadre est fabriqu� artisanalement dans notre atelier de Bordeaux afin d'obtenir le diam�tre et l'�paisseur adapt�s � un v�lo tout-terrain de premier choix. Le cadre en aluminium soud� � chaud pr�sente un tube d'un plus grand diam�tre, afin d'absorber les bosses. |
+
+ Given I clear the previous results
+ When I update the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
+ | PageNumber | PageSize | Sorting |
+ | 0 | 5 | Description ASC |
+ And I call the method 'FindAllAsync' with the parameter values
+ | Key | Value | TypeName |
+ | pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 8 | 37 | 5 | 0 |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 1487 | 6/1/2007 12:00:00 AM | 5c1dab3a-4b31-4d9d-a14f-3cb61949b79b | Adapt� � tous les usages, sur route ou tout-terrain. Pour toutes les bourses. Changement de braquet en douceur et conduite confortable. |
+ | 513 | 6/1/2007 12:00:00 AM | 741eae59-5e59-4dbc-9086-2633392c2582 | All-occasion value bike with our basic comfort and safety features. Offers wider, more stable tires for a ride around town or weekend trip. |
+ | 627 | 6/1/2007 12:00:00 AM | ebf2f0a4-89f2-4d31-be48-d8fd278f3024 | All-weather brake pads; provides superior stopping by applying more surface to the rim. |
+ | 1488 | 6/1/2007 12:00:00 AM | 79065ec8-2080-4120-a4ea-bfa7ea1f1f9d | Ce v�lo offre un excellent rapport qualit�-prix. Vif et facile � man�uvrer, il se conduit en toute tranquillit� sur les chemins et les sentiers. |
+ | 1605 | 6/1/2007 12:00:00 AM | 9cfed570-180a-44ea-8233-55116a0ddcb9 | Chaque cadre est fabriqu� artisanalement dans notre atelier de Bordeaux afin d'obtenir le diam�tre et l'�paisseur adapt�s � un v�lo tout-terrain de premier choix. Le cadre en aluminium soud� � chaud pr�sente un tube d'un plus grand diam�tre, afin d'absorber les bosses. |
+
+ Given I clear the previous results
+ When I update the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
+ | PageNumber | PageSize | Sorting |
+ | 0 | 5 | Description ASC |
+ And I call the method 'FindAllAsync' with the parameter values
+ | Key | Value | TypeName |
+ | pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 8 | 37 | 5 | 0 |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 1487 | 6/1/2007 12:00:00 AM | 5c1dab3a-4b31-4d9d-a14f-3cb61949b79b | Adapt� � tous les usages, sur route ou tout-terrain. Pour toutes les bourses. Changement de braquet en douceur et conduite confortable. |
+ | 513 | 6/1/2007 12:00:00 AM | 741eae59-5e59-4dbc-9086-2633392c2582 | All-occasion value bike with our basic comfort and safety features. Offers wider, more stable tires for a ride around town or weekend trip. |
+ | 627 | 6/1/2007 12:00:00 AM | ebf2f0a4-89f2-4d31-be48-d8fd278f3024 | All-weather brake pads; provides superior stopping by applying more surface to the rim. |
+ | 1488 | 6/1/2007 12:00:00 AM | 79065ec8-2080-4120-a4ea-bfa7ea1f1f9d | Ce v�lo offre un excellent rapport qualit�-prix. Vif et facile � man�uvrer, il se conduit en toute tranquillit� sur les chemins et les sentiers. |
+ | 1605 | 6/1/2007 12:00:00 AM | 9cfed570-180a-44ea-8233-55116a0ddcb9 | Chaque cadre est fabriqu� artisanalement dans notre atelier de Bordeaux afin d'obtenir le diam�tre et l'�paisseur adapt�s � un v�lo tout-terrain de premier choix. Le cadre en aluminium soud� � chaud pr�sente un tube d'un plus grand diam�tre, afin d'absorber les bosses. |
+
+Scenario: FindAllAsync_0_5_Description3TimesTheSameDescending
+
+ When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
+ | PageNumber | PageSize | Sorting |
+ | 0 | 5 | Description Desc |
+ And I call the method 'FindAllAsync' with the parameter values
+ | Key | Value | TypeName |
+ | pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 8 | 37 | 5 | 0 |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 630 | 6/1/2007 12:00:00 AM | 28c4682c-38b2-4b61-a2ae-bcac7c7ce29b | Wide-link design. |
+ | 1504 | 6/1/2007 12:00:00 AM | e3bac4a6-220c-4e5e-8261-51e08906c0e8 | Voyagez confortablement et avec �l�gance. Confort et s�curit� maximum. Large �ventail de vitesses pour gravir toutes les c�tes. Sa fabrication en alliage d'aluminium haute technologie est synonyme de robustesse, sans ajout de poids. |
+ | 1502 | 6/1/2007 12:00:00 AM | e5288050-bc5b-45cc-8849-c7d4af2fe2b6 | V�lo de qualit� pour tous usages, dot� d'un bon niveau de confort et de s�curit�. Pr�sente des pneus plus larges et plus stables pour les sorties en ville ou les randonn�es du week-end. |
+ | 1493 | 6/1/2007 12:00:00 AM | 7943455f-3fbe-44c0-9ac2-7ee642d3944b | V�lo d'adulte d'entr�e de gamme�; permet une conduite confortable en ville ou sur les chemins de campagne. Moyeux et rayons � blocage rapide. |
+ | 1211 | 6/1/2007 12:00:00 AM | 12f60253-f8e1-4f76-8142-6232396b8f17 | Unisex long-sleeve AWC logo microfiber cycling jersey |
+
+ Given I clear the previous results
+ When I update the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
+ | PageNumber | PageSize | Sorting |
+ | 0 | 5 | Description desc |
+ And I call the method 'FindAllAsync' with the parameter values
+ | Key | Value | TypeName |
+ | pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 8 | 37 | 5 | 0 |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 630 | 6/1/2007 12:00:00 AM | 28c4682c-38b2-4b61-a2ae-bcac7c7ce29b | Wide-link design. |
+ | 1504 | 6/1/2007 12:00:00 AM | e3bac4a6-220c-4e5e-8261-51e08906c0e8 | Voyagez confortablement et avec �l�gance. Confort et s�curit� maximum. Large �ventail de vitesses pour gravir toutes les c�tes. Sa fabrication en alliage d'aluminium haute technologie est synonyme de robustesse, sans ajout de poids. |
+ | 1502 | 6/1/2007 12:00:00 AM | e5288050-bc5b-45cc-8849-c7d4af2fe2b6 | V�lo de qualit� pour tous usages, dot� d'un bon niveau de confort et de s�curit�. Pr�sente des pneus plus larges et plus stables pour les sorties en ville ou les randonn�es du week-end. |
+ | 1493 | 6/1/2007 12:00:00 AM | 7943455f-3fbe-44c0-9ac2-7ee642d3944b | V�lo d'adulte d'entr�e de gamme�; permet une conduite confortable en ville ou sur les chemins de campagne. Moyeux et rayons � blocage rapide. |
+ | 1211 | 6/1/2007 12:00:00 AM | 12f60253-f8e1-4f76-8142-6232396b8f17 | Unisex long-sleeve AWC logo microfiber cycling jersey |
+
+ Given I clear the previous results
+ When I update the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
+ | PageNumber | PageSize | Sorting |
+ | 0 | 5 | Description DESC |
+ And I call the method 'FindAllAsync' with the parameter values
+ | Key | Value | TypeName |
+ | pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 8 | 37 | 5 | 0 |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 630 | 6/1/2007 12:00:00 AM | 28c4682c-38b2-4b61-a2ae-bcac7c7ce29b | Wide-link design. |
+ | 1504 | 6/1/2007 12:00:00 AM | e3bac4a6-220c-4e5e-8261-51e08906c0e8 | Voyagez confortablement et avec �l�gance. Confort et s�curit� maximum. Large �ventail de vitesses pour gravir toutes les c�tes. Sa fabrication en alliage d'aluminium haute technologie est synonyme de robustesse, sans ajout de poids. |
+ | 1502 | 6/1/2007 12:00:00 AM | e5288050-bc5b-45cc-8849-c7d4af2fe2b6 | V�lo de qualit� pour tous usages, dot� d'un bon niveau de confort et de s�curit�. Pr�sente des pneus plus larges et plus stables pour les sorties en ville ou les randonn�es du week-end. |
+ | 1493 | 6/1/2007 12:00:00 AM | 7943455f-3fbe-44c0-9ac2-7ee642d3944b | V�lo d'adulte d'entr�e de gamme�; permet une conduite confortable en ville ou sur les chemins de campagne. Moyeux et rayons � blocage rapide. |
+ | 1211 | 6/1/2007 12:00:00 AM | 12f60253-f8e1-4f76-8142-6232396b8f17 | Unisex long-sleeve AWC logo microfiber cycling jersey |
+
+Scenario: FindAllAsync_0_5_Description7TimesAlternatingDirection
+
+ When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
+ | PageNumber | PageSize | Sorting |
+ | 0 | 5 | Description |
+ And I call the method 'FindAllAsync' with the parameter values
+ | Key | Value | TypeName |
+ | pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 8 | 37 | 5 | 0 |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 1487 | 6/1/2007 12:00:00 AM | 5c1dab3a-4b31-4d9d-a14f-3cb61949b79b | Adapt� � tous les usages, sur route ou tout-terrain. Pour toutes les bourses. Changement de braquet en douceur et conduite confortable. |
+ | 513 | 6/1/2007 12:00:00 AM | 741eae59-5e59-4dbc-9086-2633392c2582 | All-occasion value bike with our basic comfort and safety features. Offers wider, more stable tires for a ride around town or weekend trip. |
+ | 627 | 6/1/2007 12:00:00 AM | ebf2f0a4-89f2-4d31-be48-d8fd278f3024 | All-weather brake pads; provides superior stopping by applying more surface to the rim. |
+ | 1488 | 6/1/2007 12:00:00 AM | 79065ec8-2080-4120-a4ea-bfa7ea1f1f9d | Ce v�lo offre un excellent rapport qualit�-prix. Vif et facile � man�uvrer, il se conduit en toute tranquillit� sur les chemins et les sentiers. |
+ | 1605 | 6/1/2007 12:00:00 AM | 9cfed570-180a-44ea-8233-55116a0ddcb9 | Chaque cadre est fabriqu� artisanalement dans notre atelier de Bordeaux afin d'obtenir le diam�tre et l'�paisseur adapt�s � un v�lo tout-terrain de premier choix. Le cadre en aluminium soud� � chaud pr�sente un tube d'un plus grand diam�tre, afin d'absorber les bosses. |
+
+ Given I clear the previous results
+ When I update the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
+ | PageNumber | PageSize | Sorting |
+ | 0 | 5 | Description Desc |
+ And I call the method 'FindAllAsync' with the parameter values
+ | Key | Value | TypeName |
+ | pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 8 | 37 | 5 | 0 |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 630 | 6/1/2007 12:00:00 AM | 28c4682c-38b2-4b61-a2ae-bcac7c7ce29b | Wide-link design. |
+ | 1504 | 6/1/2007 12:00:00 AM | e3bac4a6-220c-4e5e-8261-51e08906c0e8 | Voyagez confortablement et avec �l�gance. Confort et s�curit� maximum. Large �ventail de vitesses pour gravir toutes les c�tes. Sa fabrication en alliage d'aluminium haute technologie est synonyme de robustesse, sans ajout de poids. |
+ | 1502 | 6/1/2007 12:00:00 AM | e5288050-bc5b-45cc-8849-c7d4af2fe2b6 | V�lo de qualit� pour tous usages, dot� d'un bon niveau de confort et de s�curit�. Pr�sente des pneus plus larges et plus stables pour les sorties en ville ou les randonn�es du week-end. |
+ | 1493 | 6/1/2007 12:00:00 AM | 7943455f-3fbe-44c0-9ac2-7ee642d3944b | V�lo d'adulte d'entr�e de gamme�; permet une conduite confortable en ville ou sur les chemins de campagne. Moyeux et rayons � blocage rapide. |
+ | 1211 | 6/1/2007 12:00:00 AM | 12f60253-f8e1-4f76-8142-6232396b8f17 | Unisex long-sleeve AWC logo microfiber cycling jersey |
+
+ Given I clear the previous results
+ When I update the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
+ | PageNumber | PageSize | Sorting |
+ | 0 | 5 | Description |
+ And I call the method 'FindAllAsync' with the parameter values
+ | Key | Value | TypeName |
+ | pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 8 | 37 | 5 | 0 |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 1487 | 6/1/2007 12:00:00 AM | 5c1dab3a-4b31-4d9d-a14f-3cb61949b79b | Adapt� � tous les usages, sur route ou tout-terrain. Pour toutes les bourses. Changement de braquet en douceur et conduite confortable. |
+ | 513 | 6/1/2007 12:00:00 AM | 741eae59-5e59-4dbc-9086-2633392c2582 | All-occasion value bike with our basic comfort and safety features. Offers wider, more stable tires for a ride around town or weekend trip. |
+ | 627 | 6/1/2007 12:00:00 AM | ebf2f0a4-89f2-4d31-be48-d8fd278f3024 | All-weather brake pads; provides superior stopping by applying more surface to the rim. |
+ | 1488 | 6/1/2007 12:00:00 AM | 79065ec8-2080-4120-a4ea-bfa7ea1f1f9d | Ce v�lo offre un excellent rapport qualit�-prix. Vif et facile � man�uvrer, il se conduit en toute tranquillit� sur les chemins et les sentiers. |
+ | 1605 | 6/1/2007 12:00:00 AM | 9cfed570-180a-44ea-8233-55116a0ddcb9 | Chaque cadre est fabriqu� artisanalement dans notre atelier de Bordeaux afin d'obtenir le diam�tre et l'�paisseur adapt�s � un v�lo tout-terrain de premier choix. Le cadre en aluminium soud� � chaud pr�sente un tube d'un plus grand diam�tre, afin d'absorber les bosses. |
+
+ Given I clear the previous results
+ When I update the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
+ | PageNumber | PageSize | Sorting |
+ | 0 | 5 | Description Desc |
+ And I call the method 'FindAllAsync' with the parameter values
+ | Key | Value | TypeName |
+ | pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 8 | 37 | 5 | 0 |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 630 | 6/1/2007 12:00:00 AM | 28c4682c-38b2-4b61-a2ae-bcac7c7ce29b | Wide-link design. |
+ | 1504 | 6/1/2007 12:00:00 AM | e3bac4a6-220c-4e5e-8261-51e08906c0e8 | Voyagez confortablement et avec �l�gance. Confort et s�curit� maximum. Large �ventail de vitesses pour gravir toutes les c�tes. Sa fabrication en alliage d'aluminium haute technologie est synonyme de robustesse, sans ajout de poids. |
+ | 1502 | 6/1/2007 12:00:00 AM | e5288050-bc5b-45cc-8849-c7d4af2fe2b6 | V�lo de qualit� pour tous usages, dot� d'un bon niveau de confort et de s�curit�. Pr�sente des pneus plus larges et plus stables pour les sorties en ville ou les randonn�es du week-end. |
+ | 1493 | 6/1/2007 12:00:00 AM | 7943455f-3fbe-44c0-9ac2-7ee642d3944b | V�lo d'adulte d'entr�e de gamme�; permet une conduite confortable en ville ou sur les chemins de campagne. Moyeux et rayons � blocage rapide. |
+ | 1211 | 6/1/2007 12:00:00 AM | 12f60253-f8e1-4f76-8142-6232396b8f17 | Unisex long-sleeve AWC logo microfiber cycling jersey |
+
+ Given I clear the previous results
+ When I update the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
+ | PageNumber | PageSize | Sorting |
+ | 0 | 5 | Description |
+ And I call the method 'FindAllAsync' with the parameter values
+ | Key | Value | TypeName |
+ | pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 8 | 37 | 5 | 0 |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 1487 | 6/1/2007 12:00:00 AM | 5c1dab3a-4b31-4d9d-a14f-3cb61949b79b | Adapt� � tous les usages, sur route ou tout-terrain. Pour toutes les bourses. Changement de braquet en douceur et conduite confortable. |
+ | 513 | 6/1/2007 12:00:00 AM | 741eae59-5e59-4dbc-9086-2633392c2582 | All-occasion value bike with our basic comfort and safety features. Offers wider, more stable tires for a ride around town or weekend trip. |
+ | 627 | 6/1/2007 12:00:00 AM | ebf2f0a4-89f2-4d31-be48-d8fd278f3024 | All-weather brake pads; provides superior stopping by applying more surface to the rim. |
+ | 1488 | 6/1/2007 12:00:00 AM | 79065ec8-2080-4120-a4ea-bfa7ea1f1f9d | Ce v�lo offre un excellent rapport qualit�-prix. Vif et facile � man�uvrer, il se conduit en toute tranquillit� sur les chemins et les sentiers. |
+ | 1605 | 6/1/2007 12:00:00 AM | 9cfed570-180a-44ea-8233-55116a0ddcb9 | Chaque cadre est fabriqu� artisanalement dans notre atelier de Bordeaux afin d'obtenir le diam�tre et l'�paisseur adapt�s � un v�lo tout-terrain de premier choix. Le cadre en aluminium soud� � chaud pr�sente un tube d'un plus grand diam�tre, afin d'absorber les bosses. |
+
+ Given I clear the previous results
+ When I update the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
+ | PageNumber | PageSize | Sorting |
+ | 0 | 5 | Description Desc |
+ And I call the method 'FindAllAsync' with the parameter values
+ | Key | Value | TypeName |
+ | pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 8 | 37 | 5 | 0 |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 630 | 6/1/2007 12:00:00 AM | 28c4682c-38b2-4b61-a2ae-bcac7c7ce29b | Wide-link design. |
+ | 1504 | 6/1/2007 12:00:00 AM | e3bac4a6-220c-4e5e-8261-51e08906c0e8 | Voyagez confortablement et avec �l�gance. Confort et s�curit� maximum. Large �ventail de vitesses pour gravir toutes les c�tes. Sa fabrication en alliage d'aluminium haute technologie est synonyme de robustesse, sans ajout de poids. |
+ | 1502 | 6/1/2007 12:00:00 AM | e5288050-bc5b-45cc-8849-c7d4af2fe2b6 | V�lo de qualit� pour tous usages, dot� d'un bon niveau de confort et de s�curit�. Pr�sente des pneus plus larges et plus stables pour les sorties en ville ou les randonn�es du week-end. |
+ | 1493 | 6/1/2007 12:00:00 AM | 7943455f-3fbe-44c0-9ac2-7ee642d3944b | V�lo d'adulte d'entr�e de gamme�; permet une conduite confortable en ville ou sur les chemins de campagne. Moyeux et rayons � blocage rapide. |
+ | 1211 | 6/1/2007 12:00:00 AM | 12f60253-f8e1-4f76-8142-6232396b8f17 | Unisex long-sleeve AWC logo microfiber cycling jersey |
+
+ Given I clear the previous results
+ When I update the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
+ | PageNumber | PageSize | Sorting |
+ | 0 | 5 | Description |
+ And I call the method 'FindAllAsync' with the parameter values
+ | Key | Value | TypeName |
+ | pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 8 | 37 | 5 | 0 |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 1487 | 6/1/2007 12:00:00 AM | 5c1dab3a-4b31-4d9d-a14f-3cb61949b79b | Adapt� � tous les usages, sur route ou tout-terrain. Pour toutes les bourses. Changement de braquet en douceur et conduite confortable. |
+ | 513 | 6/1/2007 12:00:00 AM | 741eae59-5e59-4dbc-9086-2633392c2582 | All-occasion value bike with our basic comfort and safety features. Offers wider, more stable tires for a ride around town or weekend trip. |
+ | 627 | 6/1/2007 12:00:00 AM | ebf2f0a4-89f2-4d31-be48-d8fd278f3024 | All-weather brake pads; provides superior stopping by applying more surface to the rim. |
+ | 1488 | 6/1/2007 12:00:00 AM | 79065ec8-2080-4120-a4ea-bfa7ea1f1f9d | Ce v�lo offre un excellent rapport qualit�-prix. Vif et facile � man�uvrer, il se conduit en toute tranquillit� sur les chemins et les sentiers. |
+ | 1605 | 6/1/2007 12:00:00 AM | 9cfed570-180a-44ea-8233-55116a0ddcb9 | Chaque cadre est fabriqu� artisanalement dans notre atelier de Bordeaux afin d'obtenir le diam�tre et l'�paisseur adapt�s � un v�lo tout-terrain de premier choix. Le cadre en aluminium soud� � chaud pr�sente un tube d'un plus grand diam�tre, afin d'absorber les bosses. |
diff --git a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/ProductDescriptionServiceFindTests.feature b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/Find/ProductDescriptionServiceFindAllAsyncTests.feature
similarity index 57%
rename from src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/ProductDescriptionServiceFindTests.feature
rename to src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/Find/ProductDescriptionServiceFindAllAsyncTests.feature
index 5479e89..6f5a151 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/ProductDescriptionServiceFindTests.feature
+++ b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/Find/ProductDescriptionServiceFindAllAsyncTests.feature
@@ -1,48 +1,15 @@
-Feature: ProductDescriptionServiceFindTests
+Feature: ProductDescriptionServiceFindAllAsyncTests
System tests for the ProductDescriptionService
-Testing the methods FindAsync and FindAllAsync
-
+Testing the methods FindAllAsync
Background:
Given The service to test is 'AdventureWorksDemo.Data.Services.IProductDescriptionService'
-Scenario: FindAsync513
- When I call the method 'FindAsync' with the parameter values
- | Key | Value | TypeName |
- | ProductDescriptionId | 513 | int |
- Then the result is of type
- | Expected |
- | AdventureWorksDemo.Data.Models.ProductDescriptionModel |
- And the result is
- | ProductDescriptionId | ModifiedDate | Rowguid | Description |
- | 513 | 6/1/2007 12:00:00 AM | 741eae59-5e59-4dbc-9086-2633392c2582 | All-occasion value bike with our basic comfort and safety features. Offers wider, more stable tires for a ride around town or weekend trip. |
-
-Scenario: FindAsync209
- When I call the method 'FindAsync' with the parameter values
- | Key | Value | TypeName |
- | ProductDescriptionId | 209 | int |
- Then the result is of type
- | Expected |
- | AdventureWorksDemo.Data.Models.ProductDescriptionModel |
- And the result is
- | ProductDescriptionId | ModifiedDate | Rowguid | Description |
- | 209 | 6/1/2007 12:00:00 AM | f5ff5ffd-cb7c-4ad6-bbc9-4d250bb6e98d | Entry level adult bike; offers a comfortable ride cross-country or down the block. Quick-release hubs and rims. |
-
-Scenario: FindAsync1234
- When I call the method 'FindAsync' with the parameter values
- | Key | Value | TypeName |
- | ProductDescriptionId | 1234 | int |
-
- Then the result is of type
- | Expected |
- | AdventureWorksDemo.Data.Models.ProductDescriptionModel |
- And the result is null
-
-Scenario: FindAllAsync_1_5
+Scenario: FindAllAsync_0_5
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
| PageNumber | PageSize |
- | 1 | 5 |
+ | 0 | 5 |
And I call the method 'FindAllAsync' with the parameter values
| Key | Value | TypeName |
| pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
@@ -51,8 +18,8 @@ Scenario: FindAllAsync_1_5
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
| TotalPages | TotalCount | PageSize | CurrentPage |
- | 8 | 37 | 5 | 1 |
- And the results are
+ | 8 | 37 | 5 | 0 |
+ And the sorted results are
| ProductDescriptionId | ModifiedDate | Rowguid | Description |
| 8 | 6/1/2007 12:00:00 AM | 8e6746e5-ad97-46e2-bd24-fcea075c3b52 | Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride. |
| 64 | 6/1/2007 12:00:00 AM | 7b1c4e90-85e2-4792-b47b-e0c424e2ec94 | This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road. |
@@ -60,6 +27,80 @@ Scenario: FindAllAsync_1_5
| 209 | 6/1/2007 12:00:00 AM | f5ff5ffd-cb7c-4ad6-bbc9-4d250bb6e98d | Entry level adult bike; offers a comfortable ride cross-country or down the block. Quick-release hubs and rims. |
| 513 | 6/1/2007 12:00:00 AM | 741eae59-5e59-4dbc-9086-2633392c2582 | All-occasion value bike with our basic comfort and safety features. Offers wider, more stable tires for a ride around town or weekend trip. |
+Scenario: FindAllAsync_1_5
+ When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
+ | PageNumber | PageSize |
+ | 1 | 5 |
+ And I call the method 'FindAllAsync' with the parameter values
+ | Key | Value | TypeName |
+ | pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 8 | 37 | 5 | 1 |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 554 | 6/1/2007 12:00:00 AM | ddc955b2-843e-49ce-8f7b-54870f6135eb | The plush custom saddle keeps you riding all day, and there's plenty of space to add panniers and bike bags to the newly-redesigned carrier. This bike has stability when fully-loaded. |
+ | 594 | 6/1/2007 12:00:00 AM | 32b82c92-e545-4da0-a175-0be710b482fe | Travel in style and comfort. Designed for maximum comfort and safety. Wide gear range takes on all hills. High-tech aluminum alloy construction provides durability without added weight. |
+ | 627 | 6/1/2007 12:00:00 AM | ebf2f0a4-89f2-4d31-be48-d8fd278f3024 | All-weather brake pads; provides superior stopping by applying more surface to the rim. |
+ | 630 | 6/1/2007 12:00:00 AM | 28c4682c-38b2-4b61-a2ae-bcac7c7ce29b | Wide-link design. |
+ | 647 | 6/1/2007 12:00:00 AM | 7ad9e29f-16cf-4db0-b073-cc62d501b61a | Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps. |
+
+Scenario: FindAllAsync_0_500
+ When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
+ | PageNumber | PageSize |
+ | 0 | 500 |
+ And I call the method 'FindAllAsync' with the parameter values
+ | Key | Value | TypeName |
+ | pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 1 | 37 | 100 | 0 |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 8 | 6/1/2007 12:00:00 AM | 8e6746e5-ad97-46e2-bd24-fcea075c3b52 | Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride. |
+ | 64 | 6/1/2007 12:00:00 AM | 7b1c4e90-85e2-4792-b47b-e0c424e2ec94 | This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road. |
+ | 128 | 3/11/2008 10:32:17.973 AM | 130709e6-8512-49b9-9f62-1f5c99152056 | Serious back-country riding. Perfect for all levels of competition. Uses the same HL Frame as the Mountain-100. |
+ | 209 | 6/1/2007 12:00:00 AM | f5ff5ffd-cb7c-4ad6-bbc9-4d250bb6e98d | Entry level adult bike; offers a comfortable ride cross-country or down the block. Quick-release hubs and rims. |
+ | 513 | 6/1/2007 12:00:00 AM | 741eae59-5e59-4dbc-9086-2633392c2582 | All-occasion value bike with our basic comfort and safety features. Offers wider, more stable tires for a ride around town or weekend trip. |
+ | 554 | 6/1/2007 12:00:00 AM | ddc955b2-843e-49ce-8f7b-54870f6135eb | The plush custom saddle keeps you riding all day, and there's plenty of space to add panniers and bike bags to the newly-redesigned carrier. This bike has stability when fully-loaded. |
+ | 594 | 6/1/2007 12:00:00 AM | 32b82c92-e545-4da0-a175-0be710b482fe | Travel in style and comfort. Designed for maximum comfort and safety. Wide gear range takes on all hills. High-tech aluminum alloy construction provides durability without added weight. |
+ | 627 | 6/1/2007 12:00:00 AM | ebf2f0a4-89f2-4d31-be48-d8fd278f3024 | All-weather brake pads; provides superior stopping by applying more surface to the rim. |
+ | 630 | 6/1/2007 12:00:00 AM | 28c4682c-38b2-4b61-a2ae-bcac7c7ce29b | Wide-link design. |
+ | 647 | 6/1/2007 12:00:00 AM | 7ad9e29f-16cf-4db0-b073-cc62d501b61a | Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps. |
+ | 661 | 6/1/2007 12:00:00 AM | d61c9d54-22c3-4563-a418-0b9dc7e03850 | Made from the same aluminum alloy as our top-of-the line HL frame, the ML features a lightweight down-tube milled to the perfect diameter for optimal strength. Women's version. |
+ | 848 | 6/1/2007 12:00:00 AM | 03acbb19-749a-48a1-b77e-5d2a48e8dc3a | Lightweight, durable, clipless pedal with adjustable tension. |
+ | 1020 | 6/1/2007 12:00:00 AM | f4c70a6b-bbe8-4774-9d75-393d3f315e9b | The LL Frame provides a safe comfortable ride, while offering superior bump absorption in a value-priced aluminum frame. |
+ | 1196 | 6/1/2007 12:00:00 AM | c65bee64-4dba-47ec-91cd-31356ba379e1 | Heavy duty, abrasion-resistant shorts feature seamless, lycra inner shorts with anti-bacterial chamois for comfort. |
+ | 1205 | 6/1/2007 12:00:00 AM | 58d86ede-0519-4263-a264-a2b5b01a6c7b | Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets. |
+ | 1208 | 6/1/2007 12:00:00 AM | 9f436663-525d-4cc2-85ba-47d20bcea0ec | Thin, lightweight and durable with cuffs that stay up. |
+ | 1210 | 6/1/2007 12:00:00 AM | 66f84b21-1a43-49d3-8883-09cdb77fffef | Traditional style with a flip-up brim; one-size fits all. |
+ | 1211 | 6/1/2007 12:00:00 AM | 12f60253-f8e1-4f76-8142-6232396b8f17 | Unisex long-sleeve AWC logo microfiber cycling jersey |
+ | 1487 | 6/1/2007 12:00:00 AM | 5c1dab3a-4b31-4d9d-a14f-3cb61949b79b | Adapt� � tous les usages, sur route ou tout-terrain. Pour toutes les bourses. Changement de braquet en douceur et conduite confortable. |
+ | 1488 | 6/1/2007 12:00:00 AM | 79065ec8-2080-4120-a4ea-bfa7ea1f1f9d | Ce v�lo offre un excellent rapport qualit�-prix. Vif et facile � man�uvrer, il se conduit en toute tranquillit� sur les chemins et les sentiers. |
+ | 1490 | 3/11/2008 10:32:17.973 AM | 2b6fa2a7-4815-47b6-a6bc-d6aec23b85cc | Conduite sur terrains tr�s accident�s. Id�al pour tous les niveaux de comp�tition. Utilise le m�me cadre HL que le Montain-100. |
+ | 1493 | 6/1/2007 12:00:00 AM | 7943455f-3fbe-44c0-9ac2-7ee642d3944b | V�lo d'adulte d'entr�e de gamme�; permet une conduite confortable en ville ou sur les chemins de campagne. Moyeux et rayons � blocage rapide. |
+ | 1502 | 6/1/2007 12:00:00 AM | e5288050-bc5b-45cc-8849-c7d4af2fe2b6 | V�lo de qualit� pour tous usages, dot� d'un bon niveau de confort et de s�curit�. Pr�sente des pneus plus larges et plus stables pour les sorties en ville ou les randonn�es du week-end. |
+ | 1503 | 6/1/2007 12:00:00 AM | 28b132c3-108c-412d-9918-a8c9297dfb73 | La selle rembourr�e offre un confort optimal. Le porte-bagages nouvellement remani� offre diverses possibilit�s d'ajout de paniers ou de sacoches. Ce v�lo reste parfaitement stable une fois charg�. |
+ | 1504 | 6/1/2007 12:00:00 AM | e3bac4a6-220c-4e5e-8261-51e08906c0e8 | Voyagez confortablement et avec �l�gance. Confort et s�curit� maximum. Large �ventail de vitesses pour gravir toutes les c�tes. Sa fabrication en alliage d'aluminium haute technologie est synonyme de robustesse, sans ajout de poids. |
+ | 1509 | 6/1/2007 12:00:00 AM | 5ed8186a-6049-42b1-b1b0-3b1f899c538b | Patins de freinage pour tous les temps�; freinage renforc� par l'application d'une plus grande surface sur la jante. |
+ | 1510 | 6/1/2007 12:00:00 AM | 64723c0c-09d5-497d-83a3-4561818a8f1c | Conception liaison large. |
+ | 1517 | 6/1/2007 12:00:00 AM | f3cd990a-b70d-43c8-a075-934a3e98b5aa | Dot� du m�me alliage en aluminium que notre cadre HL haut de gamme, le ML poss�de un tube l�ger dont le diam�tre est pr�vu pour offrir une r�sistance optimale. Version femmes. |
+ | 1537 | 6/1/2007 12:00:00 AM | 6a60e7f6-a5cd-4e7b-8612-9340e46bf66d | P�dales automatiques l�g�res et robustes avec tension r�glable. |
+ | 1571 | 6/1/2007 12:00:00 AM | e95e1259-b822-40ee-aa86-7de9f9e0f0ea | Le cadre LL en aluminium offre une conduite confortable, une excellente absorption des bosses pour un tr�s bon rapport qualit�-prix. |
+ | 1587 | 6/1/2007 12:00:00 AM | e11a3c2a-b074-48f9-8226-16d65c2f91c2 | Cuissards r�sistants � l'usure pour utilisation intensive, doubl�s � l'int�rieur en Spandex, sans couture, peau de chamois anti-bact�rie pour un meilleur confort. |
+ | 1594 | 6/1/2007 12:00:00 AM | fb2a5474-9d83-4a9b-bbbd-8ffc9036866e | Maillot manches courtes classique et anti-transpiration avec contr�le de l'humidit�, fermeture avant � glissi�re et 3�poches arri�re. |
+ | 1596 | 6/1/2007 12:00:00 AM | 31d4905c-d37c-4128-bcff-4a35da9c1bb7 | Fin, l�ger et r�sistant avec des poignets qui restent en place. |
+ | 1598 | 6/1/2007 12:00:00 AM | fb627d1b-2933-4fbe-a6a4-bf69f2814ec2 | Style classique avec une visi�re relevable�; taille unique. |
+ | 1599 | 6/1/2007 12:00:00 AM | 4aae6d4f-8320-4f32-99de-bb3b1b13f1ef | Maillot de cycliste en microfibre avec le logo de l'�quipe AWV, manches longues, unisexe. |
+ | 1600 | 6/1/2020 12:00:00 AM | 4aae6d4f-1111-4f32-99de-bb3b1b13f1ef | Orphan record to deletion test |
+ | 1605 | 6/1/2007 12:00:00 AM | 9cfed570-180a-44ea-8233-55116a0ddcb9 | Chaque cadre est fabriqu� artisanalement dans notre atelier de Bordeaux afin d'obtenir le diam�tre et l'�paisseur adapt�s � un v�lo tout-terrain de premier choix. Le cadre en aluminium soud� � chaud pr�sente un tube d'un plus grand diam�tre, afin d'absorber les bosses. |
+
Scenario: FindAllAsync_1_500
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
@@ -73,8 +114,8 @@ Scenario: FindAllAsync_1_500
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
| TotalPages | TotalCount | PageSize | CurrentPage |
- | 1 | 37 | 100 | 1 |
- And the results are
+ | 1 | 37 | 100 | 0 |
+ And the sorted results are
| ProductDescriptionId | ModifiedDate | Rowguid | Description |
| 8 | 6/1/2007 12:00:00 AM | 8e6746e5-ad97-46e2-bd24-fcea075c3b52 | Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride. |
| 64 | 6/1/2007 12:00:00 AM | 7b1c4e90-85e2-4792-b47b-e0c424e2ec94 | This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road. |
@@ -128,13 +169,13 @@ Scenario: FindAllAsync_2_5
And the PagedList values are
| TotalPages | TotalCount | PageSize | CurrentPage |
| 8 | 37 | 5 | 2 |
- And the results are
- | ProductDescriptionId | ModifiedDate | Rowguid | Description |
- | 554 | 6/1/2007 12:00:00 AM | ddc955b2-843e-49ce-8f7b-54870f6135eb | The plush custom saddle keeps you riding all day, and there's plenty of space to add panniers and bike bags to the newly-redesigned carrier. This bike has stability when fully-loaded. |
- | 594 | 6/1/2007 12:00:00 AM | 32b82c92-e545-4da0-a175-0be710b482fe | Travel in style and comfort. Designed for maximum comfort and safety. Wide gear range takes on all hills. High-tech aluminum alloy construction provides durability without added weight. |
- | 627 | 6/1/2007 12:00:00 AM | ebf2f0a4-89f2-4d31-be48-d8fd278f3024 | All-weather brake pads; provides superior stopping by applying more surface to the rim. |
- | 630 | 6/1/2007 12:00:00 AM | 28c4682c-38b2-4b61-a2ae-bcac7c7ce29b | Wide-link design. |
- | 647 | 6/1/2007 12:00:00 AM | 7ad9e29f-16cf-4db0-b073-cc62d501b61a | Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps. |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 661 | 6/1/2007 12:00:00 AM | d61c9d54-22c3-4563-a418-0b9dc7e03850 | Made from the same aluminum alloy as our top-of-the line HL frame, the ML features a lightweight down-tube milled to the perfect diameter for optimal strength. Women's version. |
+ | 848 | 6/1/2007 12:00:00 AM | 03acbb19-749a-48a1-b77e-5d2a48e8dc3a | Lightweight, durable, clipless pedal with adjustable tension. |
+ | 1020 | 6/1/2007 12:00:00 AM | f4c70a6b-bbe8-4774-9d75-393d3f315e9b | The LL Frame provides a safe comfortable ride, while offering superior bump absorption in a value-priced aluminum frame. |
+ | 1196 | 6/1/2007 12:00:00 AM | c65bee64-4dba-47ec-91cd-31356ba379e1 | Heavy duty, abrasion-resistant shorts feature seamless, lycra inner shorts with anti-bacterial chamois for comfort. |
+ | 1205 | 6/1/2007 12:00:00 AM | 58d86ede-0519-4263-a264-a2b5b01a6c7b | Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets. |
Scenario: FindAllAsync_2_8
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
@@ -149,17 +190,17 @@ Scenario: FindAllAsync_2_8
And the PagedList values are
| TotalPages | TotalCount | PageSize | CurrentPage |
| 5 | 37 | 8 | 2 |
- And the results are
- | ProductDescriptionId | ModifiedDate | Rowguid | Description |
- | 630 | 6/1/2007 12:00:00 AM | 28c4682c-38b2-4b61-a2ae-bcac7c7ce29b | Wide-link design. |
- | 647 | 6/1/2007 12:00:00 AM | 7ad9e29f-16cf-4db0-b073-cc62d501b61a | Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps. |
- | 661 | 6/1/2007 12:00:00 AM | d61c9d54-22c3-4563-a418-0b9dc7e03850 | Made from the same aluminum alloy as our top-of-the line HL frame, the ML features a lightweight down-tube milled to the perfect diameter for optimal strength. Women's version. |
- | 848 | 6/1/2007 12:00:00 AM | 03acbb19-749a-48a1-b77e-5d2a48e8dc3a | Lightweight, durable, clipless pedal with adjustable tension. |
- | 1020 | 6/1/2007 12:00:00 AM | f4c70a6b-bbe8-4774-9d75-393d3f315e9b | The LL Frame provides a safe comfortable ride, while offering superior bump absorption in a value-priced aluminum frame. |
- | 1196 | 6/1/2007 12:00:00 AM | c65bee64-4dba-47ec-91cd-31356ba379e1 | Heavy duty, abrasion-resistant shorts feature seamless, lycra inner shorts with anti-bacterial chamois for comfort. |
- | 1205 | 6/1/2007 12:00:00 AM | 58d86ede-0519-4263-a264-a2b5b01a6c7b | Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets. |
- | 1208 | 6/1/2007 12:00:00 AM | 9f436663-525d-4cc2-85ba-47d20bcea0ec | Thin, lightweight and durable with cuffs that stay up. |
-
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 1210 | 6/1/2007 12:00:00 AM | 66f84b21-1a43-49d3-8883-09cdb77fffef | Traditional style with a flip-up brim; one-size fits all. |
+ | 1211 | 6/1/2007 12:00:00 AM | 12f60253-f8e1-4f76-8142-6232396b8f17 | Unisex long-sleeve AWC logo microfiber cycling jersey |
+ | 1487 | 6/1/2007 12:00:00 AM | 5c1dab3a-4b31-4d9d-a14f-3cb61949b79b | Adapt� � tous les usages, sur route ou tout-terrain. Pour toutes les bourses. Changement de braquet en douceur et conduite confortable. |
+ | 1488 | 6/1/2007 12:00:00 AM | 79065ec8-2080-4120-a4ea-bfa7ea1f1f9d | Ce v�lo offre un excellent rapport qualit�-prix. Vif et facile � man�uvrer, il se conduit en toute tranquillit� sur les chemins et les sentiers. |
+ | 1490 | 3/11/2008 10:32:17.973 AM | 2b6fa2a7-4815-47b6-a6bc-d6aec23b85cc | Conduite sur terrains tr�s accident�s. Id�al pour tous les niveaux de comp�tition. Utilise le m�me cadre HL que le Montain-100. |
+ | 1493 | 6/1/2007 12:00:00 AM | 7943455f-3fbe-44c0-9ac2-7ee642d3944b | V�lo d'adulte d'entr�e de gamme�; permet une conduite confortable en ville ou sur les chemins de campagne. Moyeux et rayons � blocage rapide. |
+ | 1502 | 6/1/2007 12:00:00 AM | e5288050-bc5b-45cc-8849-c7d4af2fe2b6 | V�lo de qualit� pour tous usages, dot� d'un bon niveau de confort et de s�curit�. Pr�sente des pneus plus larges et plus stables pour les sorties en ville ou les randonn�es du week-end. |
+ | 1503 | 6/1/2007 12:00:00 AM | 28b132c3-108c-412d-9918-a8c9297dfb73 | La selle rembourr�e offre un confort optimal. Le porte-bagages nouvellement remani� offre diverses possibilit�s d'ajout de paniers ou de sacoches. Ce v�lo reste parfaitement stable une fois charg�. |
+
Scenario: FindAllAsync_20_20
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
| PageNumber | PageSize |
@@ -173,16 +214,16 @@ Scenario: FindAllAsync_20_20
And the PagedList values are
| TotalPages | TotalCount | PageSize | CurrentPage |
| 5 | 37 | 8 | 2 |
- And the results are
- | ProductDescriptionId | ModifiedDate | Rowguid | Description |
- | 630 | 6/1/2007 12:00:00 AM | 28c4682c-38b2-4b61-a2ae-bcac7c7ce29b | Wide-link design. |
- | 647 | 6/1/2007 12:00:00 AM | 7ad9e29f-16cf-4db0-b073-cc62d501b61a | Each frame is hand-crafted in our Bothell facility to the optimum diameter and wall-thickness required of a premium mountain frame. The heat-treated welded aluminum frame has a larger diameter tube that absorbs the bumps. |
- | 661 | 6/1/2007 12:00:00 AM | d61c9d54-22c3-4563-a418-0b9dc7e03850 | Made from the same aluminum alloy as our top-of-the line HL frame, the ML features a lightweight down-tube milled to the perfect diameter for optimal strength. Women's version. |
- | 848 | 6/1/2007 12:00:00 AM | 03acbb19-749a-48a1-b77e-5d2a48e8dc3a | Lightweight, durable, clipless pedal with adjustable tension. |
- | 1020 | 6/1/2007 12:00:00 AM | f4c70a6b-bbe8-4774-9d75-393d3f315e9b | The LL Frame provides a safe comfortable ride, while offering superior bump absorption in a value-priced aluminum frame. |
- | 1196 | 6/1/2007 12:00:00 AM | c65bee64-4dba-47ec-91cd-31356ba379e1 | Heavy duty, abrasion-resistant shorts feature seamless, lycra inner shorts with anti-bacterial chamois for comfort. |
- | 1205 | 6/1/2007 12:00:00 AM | 58d86ede-0519-4263-a264-a2b5b01a6c7b | Short sleeve classic breathable jersey with superior moisture control, front zipper, and 3 back pockets. |
- | 1208 | 6/1/2007 12:00:00 AM | 9f436663-525d-4cc2-85ba-47d20bcea0ec | Thin, lightweight and durable with cuffs that stay up. |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 1210 | 6/1/2007 12:00:00 AM | 66f84b21-1a43-49d3-8883-09cdb77fffef | Traditional style with a flip-up brim; one-size fits all. |
+ | 1211 | 6/1/2007 12:00:00 AM | 12f60253-f8e1-4f76-8142-6232396b8f17 | Unisex long-sleeve AWC logo microfiber cycling jersey |
+ | 1487 | 6/1/2007 12:00:00 AM | 5c1dab3a-4b31-4d9d-a14f-3cb61949b79b | Adapt� � tous les usages, sur route ou tout-terrain. Pour toutes les bourses. Changement de braquet en douceur et conduite confortable. |
+ | 1488 | 6/1/2007 12:00:00 AM | 79065ec8-2080-4120-a4ea-bfa7ea1f1f9d | Ce v�lo offre un excellent rapport qualit�-prix. Vif et facile � man�uvrer, il se conduit en toute tranquillit� sur les chemins et les sentiers. |
+ | 1490 | 3/11/2008 10:32:17.973 AM | 2b6fa2a7-4815-47b6-a6bc-d6aec23b85cc | Conduite sur terrains tr�s accident�s. Id�al pour tous les niveaux de comp�tition. Utilise le m�me cadre HL que le Montain-100. |
+ | 1493 | 6/1/2007 12:00:00 AM | 7943455f-3fbe-44c0-9ac2-7ee642d3944b | V�lo d'adulte d'entr�e de gamme�; permet une conduite confortable en ville ou sur les chemins de campagne. Moyeux et rayons � blocage rapide. |
+ | 1502 | 6/1/2007 12:00:00 AM | e5288050-bc5b-45cc-8849-c7d4af2fe2b6 | V�lo de qualit� pour tous usages, dot� d'un bon niveau de confort et de s�curit�. Pr�sente des pneus plus larges et plus stables pour les sorties en ville ou les randonn�es du week-end. |
+ | 1503 | 6/1/2007 12:00:00 AM | 28b132c3-108c-412d-9918-a8c9297dfb73 | La selle rembourr�e offre un confort optimal. Le porte-bagages nouvellement remani� offre diverses possibilit�s d'ajout de paniers ou de sacoches. Ce v�lo reste parfaitement stable une fois charg�. |
Scenario: FindAllAsync_1234_5
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
@@ -196,9 +237,11 @@ Scenario: FindAllAsync_1234_5
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
| TotalPages | TotalCount | PageSize | CurrentPage |
- | 8 | 37 | 5 | 1234 |
- And the results are
- | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 8 | 37 | 5 | 7 |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 1600 | 6/1/2020 12:00:00 AM | 4aae6d4f-1111-4f32-99de-bb3b1b13f1ef | Orphan record to deletion test |
+ | 1605 | 6/1/2007 12:00:00 AM | 9cfed570-180a-44ea-8233-55116a0ddcb9 | Chaque cadre est fabriqu� artisanalement dans notre atelier de Bordeaux afin d'obtenir le diam�tre et l'�paisseur adapt�s � un v�lo tout-terrain de premier choix. Le cadre en aluminium soud� � chaud pr�sente un tube d'un plus grand diam�tre, afin d'absorber les bosses. |
Scenario: FindAllAsync_0_0
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
@@ -213,8 +256,8 @@ Scenario: FindAllAsync_0_0
And the PagedList values are
| TotalPages | TotalCount | PageSize | CurrentPage |
- | 2 | 37 | 25 | 1 |
- And the results are
+ | 2 | 37 | 25 | 0 |
+ And the sorted results are
| ProductDescriptionId | ModifiedDate | Rowguid | Description |
| 8 | 6/1/2007 12:00:00 AM | 8e6746e5-ad97-46e2-bd24-fcea075c3b52 | Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride. |
| 64 | 6/1/2007 12:00:00 AM | 7b1c4e90-85e2-4792-b47b-e0c424e2ec94 | This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road. |
@@ -242,10 +285,10 @@ Scenario: FindAllAsync_0_0
| 1503 | 6/1/2007 12:00:00 AM | 28b132c3-108c-412d-9918-a8c9297dfb73 | La selle rembourr�e offre un confort optimal. Le porte-bagages nouvellement remani� offre diverses possibilit�s d'ajout de paniers ou de sacoches. Ce v�lo reste parfaitement stable une fois charg�. |
| 1504 | 6/1/2007 12:00:00 AM | e3bac4a6-220c-4e5e-8261-51e08906c0e8 | Voyagez confortablement et avec �l�gance. Confort et s�curit� maximum. Large �ventail de vitesses pour gravir toutes les c�tes. Sa fabrication en alliage d'aluminium haute technologie est synonyme de robustesse, sans ajout de poids. |
-Scenario: FindAllAsync_0_5
+Scenario: FindAllAsync_7_5
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
| PageNumber | PageSize |
- | 0 | 5 |
+ | 7 | 5 |
And I call the method 'FindAllAsync' with the parameter values
| Key | Value | TypeName |
| pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
@@ -254,14 +297,29 @@ Scenario: FindAllAsync_0_5
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
| TotalPages | TotalCount | PageSize | CurrentPage |
- | 8 | 37 | 5 | 1 |
- And the results are
- | ProductDescriptionId | ModifiedDate | Rowguid | Description |
- | 8 | 6/1/2007 12:00:00 AM | 8e6746e5-ad97-46e2-bd24-fcea075c3b52 | Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride. |
- | 64 | 6/1/2007 12:00:00 AM | 7b1c4e90-85e2-4792-b47b-e0c424e2ec94 | This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road. |
- | 128 | 3/11/2008 10:32:17.973 AM | 130709e6-8512-49b9-9f62-1f5c99152056 | Serious back-country riding. Perfect for all levels of competition. Uses the same HL Frame as the Mountain-100. |
- | 209 | 6/1/2007 12:00:00 AM | f5ff5ffd-cb7c-4ad6-bbc9-4d250bb6e98d | Entry level adult bike; offers a comfortable ride cross-country or down the block. Quick-release hubs and rims. |
- | 513 | 6/1/2007 12:00:00 AM | 741eae59-5e59-4dbc-9086-2633392c2582 | All-occasion value bike with our basic comfort and safety features. Offers wider, more stable tires for a ride around town or weekend trip. |
+ | 8 | 37 | 5 | 7 |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 1600 | 6/1/2020 12:00:00 AM | 4aae6d4f-1111-4f32-99de-bb3b1b13f1ef | Orphan record to deletion test |
+ | 1605 | 6/1/2007 12:00:00 AM | 9cfed570-180a-44ea-8233-55116a0ddcb9 | Chaque cadre est fabriqu� artisanalement dans notre atelier de Bordeaux afin d'obtenir le diam�tre et l'�paisseur adapt�s � un v�lo tout-terrain de premier choix. Le cadre en aluminium soud� � chaud pr�sente un tube d'un plus grand diam�tre, afin d'absorber les bosses. |
+
+Scenario: FindAllAsync_8_5
+ When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
+ | PageNumber | PageSize |
+ | 8 | 5 |
+ And I call the method 'FindAllAsync' with the parameter values
+ | Key | Value | TypeName |
+ | pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 8 | 37 | 5 | 7 |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 1600 | 6/1/2020 12:00:00 AM | 4aae6d4f-1111-4f32-99de-bb3b1b13f1ef | Orphan record to deletion test |
+ | 1605 | 6/1/2007 12:00:00 AM | 9cfed570-180a-44ea-8233-55116a0ddcb9 | Chaque cadre est fabriqu� artisanalement dans notre atelier de Bordeaux afin d'obtenir le diam�tre et l'�paisseur adapt�s � un v�lo tout-terrain de premier choix. Le cadre en aluminium soud� � chaud pr�sente un tube d'un plus grand diam�tre, afin d'absorber les bosses. |
Scenario: FindAllAsync_5_0
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
@@ -275,7 +333,20 @@ Scenario: FindAllAsync_5_0
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
| TotalPages | TotalCount | PageSize | CurrentPage |
- | 2 | 37 | 25 | 5 |
- And the results are
- | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 2 | 37 | 25 | 1 |
+ And the sorted results are
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 1509 | 6/1/2007 12:00:00 AM | 5ed8186a-6049-42b1-b1b0-3b1f899c538b | Patins de freinage pour tous les temps�; freinage renforc� par l'application d'une plus grande surface sur la jante. |
+ | 1510 | 6/1/2007 12:00:00 AM | 64723c0c-09d5-497d-83a3-4561818a8f1c | Conception liaison large. |
+ | 1517 | 6/1/2007 12:00:00 AM | f3cd990a-b70d-43c8-a075-934a3e98b5aa | Dot� du m�me alliage en aluminium que notre cadre HL haut de gamme, le ML poss�de un tube l�ger dont le diam�tre est pr�vu pour offrir une r�sistance optimale. Version femmes. |
+ | 1537 | 6/1/2007 12:00:00 AM | 6a60e7f6-a5cd-4e7b-8612-9340e46bf66d | P�dales automatiques l�g�res et robustes avec tension r�glable. |
+ | 1571 | 6/1/2007 12:00:00 AM | e95e1259-b822-40ee-aa86-7de9f9e0f0ea | Le cadre LL en aluminium offre une conduite confortable, une excellente absorption des bosses pour un tr�s bon rapport qualit�-prix. |
+ | 1587 | 6/1/2007 12:00:00 AM | e11a3c2a-b074-48f9-8226-16d65c2f91c2 | Cuissards r�sistants � l'usure pour utilisation intensive, doubl�s � l'int�rieur en Spandex, sans couture, peau de chamois anti-bact�rie pour un meilleur confort. |
+ | 1594 | 6/1/2007 12:00:00 AM | fb2a5474-9d83-4a9b-bbbd-8ffc9036866e | Maillot manches courtes classique et anti-transpiration avec contr�le de l'humidit�, fermeture avant � glissi�re et 3�poches arri�re. |
+ | 1596 | 6/1/2007 12:00:00 AM | 31d4905c-d37c-4128-bcff-4a35da9c1bb7 | Fin, l�ger et r�sistant avec des poignets qui restent en place. |
+ | 1598 | 6/1/2007 12:00:00 AM | fb627d1b-2933-4fbe-a6a4-bf69f2814ec2 | Style classique avec une visi�re relevable�; taille unique. |
+ | 1599 | 6/1/2007 12:00:00 AM | 4aae6d4f-8320-4f32-99de-bb3b1b13f1ef | Maillot de cycliste en microfibre avec le logo de l'�quipe AWV, manches longues, unisexe. |
+ | 1600 | 6/1/2020 12:00:00 AM | 4aae6d4f-1111-4f32-99de-bb3b1b13f1ef | Orphan record to deletion test |
+ | 1605 | 6/1/2007 12:00:00 AM | 9cfed570-180a-44ea-8233-55116a0ddcb9 | Chaque cadre est fabriqu� artisanalement dans notre atelier de Bordeaux afin d'obtenir le diam�tre et l'�paisseur adapt�s � un v�lo tout-terrain de premier choix. Le cadre en aluminium soud� � chaud pr�sente un tube d'un plus grand diam�tre, afin d'absorber les bosses. |
+
\ No newline at end of file
diff --git a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/Find/ProductDescriptionServiceFindTests.feature b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/Find/ProductDescriptionServiceFindTests.feature
new file mode 100644
index 0000000..e7bd3c8
--- /dev/null
+++ b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/Find/ProductDescriptionServiceFindTests.feature
@@ -0,0 +1,40 @@
+Feature: ProductDescriptionServiceFindTests
+
+System tests for the ProductDescriptionService
+Testing the methods FindAsync and FindAllAsync
+
+
+Background:
+ Given The service to test is 'AdventureWorksDemo.Data.Services.IProductDescriptionService'
+
+Scenario: FindAsync1234
+ When I call the method 'FindAsync' with the parameter values
+ | Key | Value | TypeName |
+ | ProductDescriptionId | 1234 | int |
+
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Models.ProductDescriptionModel |
+ And the result is null
+
+Scenario: FindAsync209
+ When I call the method 'FindAsync' with the parameter values
+ | Key | Value | TypeName |
+ | ProductDescriptionId | 209 | int |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Models.ProductDescriptionModel |
+ And the result is
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 209 | 6/1/2007 12:00:00 AM | f5ff5ffd-cb7c-4ad6-bbc9-4d250bb6e98d | Entry level adult bike; offers a comfortable ride cross-country or down the block. Quick-release hubs and rims. |
+
+Scenario: FindAsync513
+ When I call the method 'FindAsync' with the parameter values
+ | Key | Value | TypeName |
+ | ProductDescriptionId | 513 | int |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Models.ProductDescriptionModel |
+ And the result is
+ | ProductDescriptionId | ModifiedDate | Rowguid | Description |
+ | 513 | 6/1/2007 12:00:00 AM | 741eae59-5e59-4dbc-9086-2633392c2582 | All-occasion value bike with our basic comfort and safety features. Offers wider, more stable tires for a ride around town or weekend trip. |
\ No newline at end of file
diff --git a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceAddTests.feature.cs b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceAddTests.feature.cs
index 9d10270..b3c7c6f 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceAddTests.feature.cs
+++ b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceAddTests.feature.cs
@@ -131,81 +131,81 @@ public async System.Threading.Tasks.Task AddAsyncNoParent()
#line 13
await testRunner.GivenAsync("I reset the database after the scenario", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given ");
#line hidden
- global::Reqnroll.Table table308 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table403 = new global::Reqnroll.Table(new string[] {
"Name",
"ParentProductCategoryId",
"Rowguid"});
- table308.AddRow(new string[] {
+ table403.AddRow(new string[] {
"PingPong",
"",
"00000000-1111-0000-0000-000000000002"});
#line 14
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table308, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table403, "When ");
#line hidden
- global::Reqnroll.Table table309 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table404 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table309.AddRow(new string[] {
+ table404.AddRow(new string[] {
"model",
"{{model}}",
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 17
- await testRunner.AndAsync("I call the method \'AddAsync\' with the parameter values", ((string)(null)), table309, "And ");
+ await testRunner.AndAsync("I call the method \'AddAsync\' with the parameter values", ((string)(null)), table404, "And ");
#line hidden
- global::Reqnroll.Table table310 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table405 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table310.AddRow(new string[] {
+ table405.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 20
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table310, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table405, "Then ");
#line hidden
- global::Reqnroll.Table table311 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table406 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table311.AddRow(new string[] {
+ table406.AddRow(new string[] {
"False",
"True",
""});
#line 23
- await testRunner.AndAsync("the result is", ((string)(null)), table311, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table406, "And ");
#line hidden
- global::Reqnroll.Table table312 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table407 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table312.AddRow(new string[] {
+ table407.AddRow(new string[] {
"5001",
"",
"PingPong",
"5/24/2024 12:34:56 PM",
"00000000-1111-0000-0000-000000000002"});
#line 26
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table312, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table407, "And ");
#line hidden
- global::Reqnroll.Table table313 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table408 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table313.AddRow(new string[] {
+ table408.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table313.AddRow(new string[] {
+ table408.AddRow(new string[] {
"42",
"",
"Record to Delete",
"6/1/2005 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-000000000001"});
- table313.AddRow(new string[] {
+ table408.AddRow(new string[] {
"5001",
"",
"PingPong",
@@ -213,7 +213,7 @@ public async System.Threading.Tasks.Task AddAsyncNoParent()
"00000000-1111-0000-0000-000000000002"});
#line 29
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table313, "And ");
+ "", ((string)(null)), table408, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -243,75 +243,75 @@ public async System.Threading.Tasks.Task AddAsyncNoParentShortName()
#line 36
await testRunner.GivenAsync("I reset the database after the scenario", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given ");
#line hidden
- global::Reqnroll.Table table314 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table409 = new global::Reqnroll.Table(new string[] {
"Name",
"ParentProductCategoryId",
"Rowguid"});
- table314.AddRow(new string[] {
+ table409.AddRow(new string[] {
"Hi",
"",
"00000000-1111-0000-0000-000000000002"});
#line 37
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table314, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table409, "When ");
#line hidden
- global::Reqnroll.Table table315 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table410 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table315.AddRow(new string[] {
+ table410.AddRow(new string[] {
"model",
"{{model}}",
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 40
- await testRunner.AndAsync("I call the method \'AddAsync\' with the parameter values", ((string)(null)), table315, "And ");
+ await testRunner.AndAsync("I call the method \'AddAsync\' with the parameter values", ((string)(null)), table410, "And ");
#line hidden
- global::Reqnroll.Table table316 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table411 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table316.AddRow(new string[] {
+ table411.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 43
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table316, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table411, "Then ");
#line hidden
- global::Reqnroll.Table table317 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table412 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table317.AddRow(new string[] {
+ table412.AddRow(new string[] {
"True",
"False",
"\'Name\' must be between 3 and 50 characters. You entered 2 characters."});
#line 46
- await testRunner.AndAsync("the result is", ((string)(null)), table317, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table412, "And ");
#line hidden
- global::Reqnroll.Table table318 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table413 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table318.AddRow(new string[] {
+ table413.AddRow(new string[] {
"0",
"",
"Hi",
"1/1/0001 12:00:00 AM",
"00000000-1111-0000-0000-000000000002"});
#line 50
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table318, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table413, "And ");
#line hidden
- global::Reqnroll.Table table319 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table414 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table319.AddRow(new string[] {
+ table414.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table319.AddRow(new string[] {
+ table414.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -319,7 +319,7 @@ public async System.Threading.Tasks.Task AddAsyncNoParentShortName()
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 54
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table319, "And ");
+ "", ((string)(null)), table414, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -349,81 +349,81 @@ public async System.Threading.Tasks.Task AddAsyncParent()
#line 60
await testRunner.GivenAsync("I reset the database after the scenario", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given ");
#line hidden
- global::Reqnroll.Table table320 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table415 = new global::Reqnroll.Table(new string[] {
"Name",
"ParentProductCategoryId",
"Rowguid"});
- table320.AddRow(new string[] {
+ table415.AddRow(new string[] {
"PingPong",
"42",
"00000000-1111-0000-0000-000000000002"});
#line 61
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table320, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table415, "When ");
#line hidden
- global::Reqnroll.Table table321 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table416 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table321.AddRow(new string[] {
+ table416.AddRow(new string[] {
"model",
"{{model}}",
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 64
- await testRunner.AndAsync("I call the method \'AddAsync\' with the parameter values", ((string)(null)), table321, "And ");
+ await testRunner.AndAsync("I call the method \'AddAsync\' with the parameter values", ((string)(null)), table416, "And ");
#line hidden
- global::Reqnroll.Table table322 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table417 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table322.AddRow(new string[] {
+ table417.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 67
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table322, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table417, "Then ");
#line hidden
- global::Reqnroll.Table table323 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table418 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table323.AddRow(new string[] {
+ table418.AddRow(new string[] {
"False",
"True",
""});
#line 70
- await testRunner.AndAsync("the result is", ((string)(null)), table323, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table418, "And ");
#line hidden
- global::Reqnroll.Table table324 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table419 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table324.AddRow(new string[] {
+ table419.AddRow(new string[] {
"5001",
"42",
"PingPong",
"5/24/2024 12:34:56 PM",
"00000000-1111-0000-0000-000000000002"});
#line 73
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table324, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table419, "And ");
#line hidden
- global::Reqnroll.Table table325 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table420 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table325.AddRow(new string[] {
+ table420.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table325.AddRow(new string[] {
+ table420.AddRow(new string[] {
"42",
"",
"Record to Delete",
"6/1/2005 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-000000000001"});
- table325.AddRow(new string[] {
+ table420.AddRow(new string[] {
"5001",
"42",
"PingPong",
@@ -431,7 +431,7 @@ public async System.Threading.Tasks.Task AddAsyncParent()
"00000000-1111-0000-0000-000000000002"});
#line 76
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table325, "And ");
+ "", ((string)(null)), table420, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -461,75 +461,75 @@ public async System.Threading.Tasks.Task AddAsyncParentShortName()
#line 83
await testRunner.GivenAsync("I reset the database after the scenario", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given ");
#line hidden
- global::Reqnroll.Table table326 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table421 = new global::Reqnroll.Table(new string[] {
"Name",
"ParentProductCategoryId",
"Rowguid"});
- table326.AddRow(new string[] {
+ table421.AddRow(new string[] {
"Hi",
"42",
"00000000-1111-0000-0000-000000000002"});
#line 84
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table326, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table421, "When ");
#line hidden
- global::Reqnroll.Table table327 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table422 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table327.AddRow(new string[] {
+ table422.AddRow(new string[] {
"model",
"{{model}}",
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 87
- await testRunner.AndAsync("I call the method \'AddAsync\' with the parameter values", ((string)(null)), table327, "And ");
+ await testRunner.AndAsync("I call the method \'AddAsync\' with the parameter values", ((string)(null)), table422, "And ");
#line hidden
- global::Reqnroll.Table table328 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table423 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table328.AddRow(new string[] {
+ table423.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 90
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table328, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table423, "Then ");
#line hidden
- global::Reqnroll.Table table329 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table424 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table329.AddRow(new string[] {
+ table424.AddRow(new string[] {
"True",
"False",
"\'Name\' must be between 3 and 50 characters. You entered 2 characters."});
#line 93
- await testRunner.AndAsync("the result is", ((string)(null)), table329, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table424, "And ");
#line hidden
- global::Reqnroll.Table table330 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table425 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table330.AddRow(new string[] {
+ table425.AddRow(new string[] {
"0",
"42",
"Hi",
"1/1/0001 12:00:00 AM",
"00000000-1111-0000-0000-000000000002"});
#line 97
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table330, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table425, "And ");
#line hidden
- global::Reqnroll.Table table331 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table426 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table331.AddRow(new string[] {
+ table426.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table331.AddRow(new string[] {
+ table426.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -537,7 +537,7 @@ public async System.Threading.Tasks.Task AddAsyncParentShortName()
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 100
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table331, "And ");
+ "", ((string)(null)), table426, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -567,131 +567,131 @@ public async System.Threading.Tasks.Task AddBatchAsync()
#line 106
await testRunner.GivenAsync("I reset the database after the scenario", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given ");
#line hidden
- global::Reqnroll.Table table332 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table427 = new global::Reqnroll.Table(new string[] {
"Name",
"ParentProductCategoryId",
"Rowguid"});
- table332.AddRow(new string[] {
+ table427.AddRow(new string[] {
"How",
"4",
"00000000-1111-1111-0000-000000000001"});
- table332.AddRow(new string[] {
+ table427.AddRow(new string[] {
"Now",
"5",
"00000000-1111-1111-0000-000000000002"});
- table332.AddRow(new string[] {
+ table427.AddRow(new string[] {
"Brown",
"41",
"00000000-1111-1111-0000-000000000003"});
- table332.AddRow(new string[] {
+ table427.AddRow(new string[] {
"Cow",
"",
"00000000-1111-1111-0000-000000000004"});
#line 107
await testRunner.WhenAsync("I populate a list of the model \'AdventureWorksDemo.Data.Models.ProductCategoryMod" +
- "el\'", ((string)(null)), table332, "When ");
+ "el\'", ((string)(null)), table427, "When ");
#line hidden
- global::Reqnroll.Table table333 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table428 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table333.AddRow(new string[] {
+ table428.AddRow(new string[] {
"model",
"{{ListOfObjects}}",
"System.Collections.Generic.IEnumerable"});
#line 113
- await testRunner.AndAsync("I call the method \'AddBatchAsync\' with the parameter values", ((string)(null)), table333, "And ");
+ await testRunner.AndAsync("I call the method \'AddBatchAsync\' with the parameter values", ((string)(null)), table428, "And ");
#line hidden
- global::Reqnroll.Table table334 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table429 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table334.AddRow(new string[] {
+ table429.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 116
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table334, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table429, "Then ");
#line hidden
- global::Reqnroll.Table table335 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table430 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table335.AddRow(new string[] {
+ table430.AddRow(new string[] {
"false",
"true",
""});
#line 119
- await testRunner.AndAsync("the result is", ((string)(null)), table335, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table430, "And ");
#line hidden
- global::Reqnroll.Table table336 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table431 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table336.AddRow(new string[] {
+ table431.AddRow(new string[] {
"5001",
"4",
"How",
"5/24/2024 12:34:56 PM",
"00000000-1111-1111-0000-000000000001"});
- table336.AddRow(new string[] {
+ table431.AddRow(new string[] {
"5002",
"5",
"Now",
"5/24/2024 12:34:56 PM",
"00000000-1111-1111-0000-000000000002"});
- table336.AddRow(new string[] {
+ table431.AddRow(new string[] {
"5003",
"41",
"Brown",
"5/24/2024 12:34:56 PM",
"00000000-1111-1111-0000-000000000003"});
- table336.AddRow(new string[] {
+ table431.AddRow(new string[] {
"5004",
"",
"Cow",
"5/24/2024 12:34:56 PM",
"00000000-1111-1111-0000-000000000004"});
#line 123
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table336, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table431, "And ");
#line hidden
- global::Reqnroll.Table table337 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table432 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table337.AddRow(new string[] {
+ table432.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table337.AddRow(new string[] {
+ table432.AddRow(new string[] {
"42",
"",
"Record to Delete",
"6/1/2005 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-000000000001"});
- table337.AddRow(new string[] {
+ table432.AddRow(new string[] {
"5001",
"4",
"How",
"5/24/2024 12:34:56 PM",
"00000000-1111-1111-0000-000000000001"});
- table337.AddRow(new string[] {
+ table432.AddRow(new string[] {
"5002",
"5",
"Now",
"5/24/2024 12:34:56 PM",
"00000000-1111-1111-0000-000000000002"});
- table337.AddRow(new string[] {
+ table432.AddRow(new string[] {
"5003",
"41",
"Brown",
"5/24/2024 12:34:56 PM",
"00000000-1111-1111-0000-000000000003"});
- table337.AddRow(new string[] {
+ table432.AddRow(new string[] {
"5004",
"",
"Cow",
@@ -699,7 +699,7 @@ await testRunner.WhenAsync("I populate a list of the model \'AdventureWorksDemo.
"00000000-1111-1111-0000-000000000004"});
#line 130
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table337, "And ");
+ "", ((string)(null)), table432, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -729,114 +729,114 @@ public async System.Threading.Tasks.Task AddBatchAsync2ShortName()
#line 140
await testRunner.GivenAsync("I reset the database after the scenario", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given ");
#line hidden
- global::Reqnroll.Table table338 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table433 = new global::Reqnroll.Table(new string[] {
"Name",
"ParentProductCategoryId",
"Rowguid"});
- table338.AddRow(new string[] {
+ table433.AddRow(new string[] {
"Hi",
"4",
"00000000-1111-1111-0000-000000000001"});
- table338.AddRow(new string[] {
+ table433.AddRow(new string[] {
"Now",
"5",
"00000000-1111-1111-0000-000000000002"});
- table338.AddRow(new string[] {
+ table433.AddRow(new string[] {
"Brown",
"41",
"00000000-1111-1111-0000-000000000003"});
- table338.AddRow(new string[] {
+ table433.AddRow(new string[] {
"It",
"",
"00000000-1111-1111-0000-000000000004"});
#line 141
await testRunner.WhenAsync("I populate a list of the model \'AdventureWorksDemo.Data.Models.ProductCategoryMod" +
- "el\'", ((string)(null)), table338, "When ");
+ "el\'", ((string)(null)), table433, "When ");
#line hidden
- global::Reqnroll.Table table339 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table434 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table339.AddRow(new string[] {
+ table434.AddRow(new string[] {
"model",
"{{ListOfObjects}}",
"System.Collections.Generic.IEnumerable"});
#line 147
- await testRunner.AndAsync("I call the method \'AddBatchAsync\' with the parameter values", ((string)(null)), table339, "And ");
+ await testRunner.AndAsync("I call the method \'AddBatchAsync\' with the parameter values", ((string)(null)), table434, "And ");
#line hidden
- global::Reqnroll.Table table340 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table435 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table340.AddRow(new string[] {
+ table435.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 150
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table340, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table435, "Then ");
#line hidden
- global::Reqnroll.Table table341 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table436 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess"});
- table341.AddRow(new string[] {
+ table436.AddRow(new string[] {
"True",
"False"});
#line 153
- await testRunner.AndAsync("the result is", ((string)(null)), table341, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table436, "And ");
#line hidden
- global::Reqnroll.Table table342 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table437 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table342.AddRow(new string[] {
+ table437.AddRow(new string[] {
"\'Name\' must be between 3 and 50 characters. You entered 2 characters."});
- table342.AddRow(new string[] {
+ table437.AddRow(new string[] {
"\'Name\' must be between 3 and 50 characters. You entered 2 characters."});
#line 156
- await testRunner.AndAsync("the results property \'Message\' contains", ((string)(null)), table342, "And ");
+ await testRunner.AndAsync("the results property \'Message\' contains", ((string)(null)), table437, "And ");
#line hidden
- global::Reqnroll.Table table343 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table438 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table343.AddRow(new string[] {
+ table438.AddRow(new string[] {
"0",
"4",
"Hi",
"1/1/0001 12:00:00 AM",
"00000000-1111-1111-0000-000000000001"});
- table343.AddRow(new string[] {
+ table438.AddRow(new string[] {
"0",
"5",
"Now",
"1/1/0001 12:00:00 AM",
"00000000-1111-1111-0000-000000000002"});
- table343.AddRow(new string[] {
+ table438.AddRow(new string[] {
"0",
"41",
"Brown",
"1/1/0001 12:00:00 AM",
"00000000-1111-1111-0000-000000000003"});
- table343.AddRow(new string[] {
+ table438.AddRow(new string[] {
"0",
"",
"It",
"1/1/0001 12:00:00 AM",
"00000000-1111-1111-0000-000000000004"});
#line 160
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table343, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table438, "And ");
#line hidden
- global::Reqnroll.Table table344 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table439 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table344.AddRow(new string[] {
+ table439.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table344.AddRow(new string[] {
+ table439.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -844,7 +844,7 @@ await testRunner.WhenAsync("I populate a list of the model \'AdventureWorksDemo.
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 167
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table344, "And ");
+ "", ((string)(null)), table439, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
diff --git a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceDeleteTests.feature.cs b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceDeleteTests.feature.cs
index 0f06e0c..d1526f2 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceDeleteTests.feature.cs
+++ b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceDeleteTests.feature.cs
@@ -128,57 +128,57 @@ public async System.Threading.Tasks.Task DeleteAsync1234()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table345 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table440 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName",
"ModifiedDate"});
- table345.AddRow(new string[] {
+ table440.AddRow(new string[] {
"productCategoryId",
"1234",
"int",
"21 Apr 2024 12:34:56"});
#line 14
- await testRunner.WhenAsync("I call the method \'DeleteAsync\' with the parameter values", ((string)(null)), table345, "When ");
+ await testRunner.WhenAsync("I call the method \'DeleteAsync\' with the parameter values", ((string)(null)), table440, "When ");
#line hidden
- global::Reqnroll.Table table346 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table441 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table346.AddRow(new string[] {
+ table441.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 17
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table346, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table441, "Then ");
#line hidden
- global::Reqnroll.Table table347 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table442 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table347.AddRow(new string[] {
+ table442.AddRow(new string[] {
"True",
"False",
"Unable to find record to delete!"});
#line 20
- await testRunner.AndAsync("the result is", ((string)(null)), table347, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table442, "And ");
#line hidden
- global::Reqnroll.Table table348 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table443 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table348.AddRow(new string[] {
+ table443.AddRow(new string[] {
"False"});
#line 24
- await testRunner.AndAsync("the ServiceResult is of type \'System.Boolean\' with the value", ((string)(null)), table348, "And ");
+ await testRunner.AndAsync("the ServiceResult is of type \'System.Boolean\' with the value", ((string)(null)), table443, "And ");
#line hidden
- global::Reqnroll.Table table349 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table444 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table349.AddRow(new string[] {
+ table444.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table349.AddRow(new string[] {
+ table444.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -186,7 +186,7 @@ public async System.Threading.Tasks.Task DeleteAsync1234()
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 27
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table349, "And ");
+ "", ((string)(null)), table444, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -216,49 +216,49 @@ public async System.Threading.Tasks.Task DeleteAsync42()
#line 36
await testRunner.GivenAsync("I reset the database after the scenario", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given ");
#line hidden
- global::Reqnroll.Table table350 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table445 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table350.AddRow(new string[] {
+ table445.AddRow(new string[] {
"productCategoryId",
"42",
"int"});
#line 37
- await testRunner.WhenAsync("I call the method \'DeleteAsync\' with the parameter values", ((string)(null)), table350, "When ");
+ await testRunner.WhenAsync("I call the method \'DeleteAsync\' with the parameter values", ((string)(null)), table445, "When ");
#line hidden
- global::Reqnroll.Table table351 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table446 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table351.AddRow(new string[] {
+ table446.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 40
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table351, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table446, "Then ");
#line hidden
- global::Reqnroll.Table table352 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table447 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table352.AddRow(new string[] {
+ table447.AddRow(new string[] {
"False",
"True",
""});
#line 43
- await testRunner.AndAsync("the result is", ((string)(null)), table352, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table447, "And ");
#line hidden
- global::Reqnroll.Table table353 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table448 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table353.AddRow(new string[] {
+ table448.AddRow(new string[] {
"True"});
#line 46
- await testRunner.AndAsync("the ServiceResult is of type \'System.Boolean\' with the value", ((string)(null)), table353, "And ");
+ await testRunner.AndAsync("the ServiceResult is of type \'System.Boolean\' with the value", ((string)(null)), table448, "And ");
#line hidden
- global::Reqnroll.Table table354 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table449 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table354.AddRow(new string[] {
+ table449.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
@@ -266,7 +266,7 @@ public async System.Threading.Tasks.Task DeleteAsync42()
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
#line 49
await testRunner.ThenAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table354, "Then ");
+ "", ((string)(null)), table449, "Then ");
#line hidden
}
await this.ScenarioCleanupAsync();
diff --git a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceFindTests.feature b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceFindTests.feature
index b871934..2639b09 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceFindTests.feature
+++ b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceFindTests.feature
@@ -50,20 +50,21 @@ Scenario: FindAllAsync_1_5
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage |
- | 9 | 42 | 5 | 1 |
- And the results are
- | ModifiedDate | Name | ParentProductCategoryId | ProductCategoryId | Rowguid |
- | 6/1/2002 12:00:00 AM | Accessories | | 4 | 2be3be36-d9a2-4eee-b593-ed895d97c2a6 |
- | 6/1/2002 12:00:00 AM | Bikes | | 1 | cfbda25c-df71-47a7-b81b-64ee161aa37c |
- | 6/1/2002 12:00:00 AM | Components | | 2 | c657828d-d808-4aba-91a3-af2ce02300e9 |
- | 6/1/2002 12:00:00 AM | Clothing | | 3 | 10a7c342-ca82-48d4-8a38-46a2eb089b74 |
- | 6/1/2002 12:00:00 AM | Mountain Bikes | 1 | 5 | 2d364ade-264a-433c-b092-4fcbf3804e01 |
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 9 | 42 | 5 | 1 |
+ And the sorted results are
+ | ModifiedDate | Name | ParentProductCategoryId | ProductCategoryId | Rowguid |
+ | 6/1/2002 12:00:00 AM | Road Bikes | 1 | 6 | 000310c0-bcc8-42c4-b0c3-45ae611af06b |
+ | 6/1/2002 12:00:00 AM | Touring Bikes | 1 | 7 | 02c5061d-ecdc-4274-b5f1-e91d76bc3f37 |
+ | 6/1/2002 12:00:00 AM | Handlebars | 2 | 8 | 3ef2c725-7135-4c85-9ae6-ae9a3bdd9283 |
+ | 6/1/2002 12:00:00 AM | Bottom Brackets | 2 | 9 | a9e54089-8a1e-4cf5-8646-e3801f685934 |
+ | 6/1/2002 12:00:00 AM | Brakes | 2 | 10 | d43ba4a3-ef0d-426b-90eb-4be4547dd30c |
+
-Scenario: FindAllAsync_1_500
+Scenario: FindAllAsync_0_500
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
| PageNumber | PageSize |
- | 1 | 500 |
+ | 0 | 500 |
And I call the method 'FindAllAsync' with the parameter values
| Key | Value | TypeName |
| pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
@@ -71,9 +72,185 @@ Scenario: FindAllAsync_1_500
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage |
- | 1 | 42 | 100 | 1 |
- And the results are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 1 | 42 | 100 | 0 |
+ And the sorted results are
+ | ProductCategoryId | ParentProductCategoryId | Name | ModifiedDate | Rowguid |
+ | 1 | | Bikes | 6/1/2002 12:00:00 AM | cfbda25c-df71-47a7-b81b-64ee161aa37c |
+ | 2 | | Components | 6/1/2002 12:00:00 AM | c657828d-d808-4aba-91a3-af2ce02300e9 |
+ | 3 | | Clothing | 6/1/2002 12:00:00 AM | 10a7c342-ca82-48d4-8a38-46a2eb089b74 |
+ | 4 | | Accessories | 6/1/2002 12:00:00 AM | 2be3be36-d9a2-4eee-b593-ed895d97c2a6 |
+ | 5 | 1 | Mountain Bikes | 6/1/2002 12:00:00 AM | 2d364ade-264a-433c-b092-4fcbf3804e01 |
+ | 6 | 1 | Road Bikes | 6/1/2002 12:00:00 AM | 000310c0-bcc8-42c4-b0c3-45ae611af06b |
+ | 7 | 1 | Touring Bikes | 6/1/2002 12:00:00 AM | 02c5061d-ecdc-4274-b5f1-e91d76bc3f37 |
+ | 8 | 2 | Handlebars | 6/1/2002 12:00:00 AM | 3ef2c725-7135-4c85-9ae6-ae9a3bdd9283 |
+ | 9 | 2 | Bottom Brackets | 6/1/2002 12:00:00 AM | a9e54089-8a1e-4cf5-8646-e3801f685934 |
+ | 10 | 2 | Brakes | 6/1/2002 12:00:00 AM | d43ba4a3-ef0d-426b-90eb-4be4547dd30c |
+ | 11 | 2 | Chains | 6/1/2002 12:00:00 AM | e93a7231-f16c-4b0f-8c41-c73fdec62da0 |
+ | 12 | 2 | Cranksets | 6/1/2002 12:00:00 AM | 4f644521-422b-4f19-974a-e3df6102567e |
+ | 13 | 2 | Derailleurs | 6/1/2002 12:00:00 AM | 1830d70c-aa2a-40c0-a271-5ba86f38f8bf |
+ | 14 | 2 | Forks | 6/1/2002 12:00:00 AM | b5f9ba42-b69b-4fdd-b2ec-57fb7b42e3cf |
+ | 15 | 2 | Headsets | 6/1/2002 12:00:00 AM | 7c782bbe-5a16-495a-aa50-10afe5a84af2 |
+ | 16 | 2 | Mountain Frames | 6/1/2002 12:00:00 AM | 61b21b65-e16a-4be7-9300-4d8e9db861be |
+ | 17 | 2 | Pedals | 6/1/2002 12:00:00 AM | 6d24ac07-7a84-4849-864a-865a14125bc9 |
+ | 18 | 2 | Road Frames | 6/1/2002 12:00:00 AM | 5515f857-075b-4f9a-87b7-43b4997077b3 |
+ | 19 | 2 | Saddles | 6/1/2002 12:00:00 AM | 049fffa3-9d30-46df-82f7-f20730ec02b3 |
+ | 20 | 2 | Touring Frames | 6/1/2002 12:00:00 AM | d2e3f1a8-56c4-4f36-b29d-5659fc0d2789 |
+ | 21 | 2 | Wheels | 6/1/2002 12:00:00 AM | 43521287-4b0b-438e-b80e-d82d9ad7c9f0 |
+ | 22 | 3 | Bib-Shorts | 6/1/2002 12:00:00 AM | 67b58d2b-5798-4a90-8c6c-5ddacf057171 |
+ | 23 | 3 | Caps | 6/1/2002 12:00:00 AM | 430dd6a8-a755-4b23-bb05-52520107da5f |
+ | 24 | 3 | Gloves | 6/1/2002 12:00:00 AM | 92d5657b-0032-4e49-bad5-41a441a70942 |
+ | 25 | 3 | Jerseys | 6/1/2002 12:00:00 AM | 09e91437-ba4f-4b1a-8215-74184fd95db8 |
+ | 26 | 3 | Shorts | 6/1/2002 12:00:00 AM | 1a5ba5b3-03c3-457c-b11e-4fa85ede87da |
+ | 27 | 3 | Socks | 6/1/2002 12:00:00 AM | 701019c3-09fe-4949-8386-c6ce686474e5 |
+ | 28 | 3 | Tights | 6/1/2002 12:00:00 AM | 5deb3e55-9897-4416-b18a-515e970bc2d1 |
+ | 29 | 3 | Vests | 6/1/2002 12:00:00 AM | 9ad7fe93-5ba0-4736-b578-ff80a2071297 |
+ | 30 | 4 | Bike Racks | 6/1/2002 12:00:00 AM | 4624b5ce-66d6-496b-9201-c053df3556cc |
+ | 31 | 4 | Bike Stands | 6/1/2002 12:00:00 AM | 43b445c8-b820-424e-a1d5-90d81da0b46f |
+ | 32 | 4 | Bottles and Cages | 6/1/2002 12:00:00 AM | 9b7dff41-9fa3-4776-8def-2c9a48c8b779 |
+ | 33 | 4 | Cleaners | 6/1/2002 12:00:00 AM | 9ad3bcf0-244d-4ec4-a6a0-fb701351c6a3 |
+ | 34 | 4 | Fenders | 6/1/2002 12:00:00 AM | 1697f8a2-0a08-4883-b7dd-d19117b4e9a7 |
+ | 35 | 4 | Helmets | 6/1/2002 12:00:00 AM | f5e07a33-c9e0-439c-b5f3-9f25fb65becc |
+ | 36 | 4 | Hydration Packs | 6/1/2002 12:00:00 AM | 646a8906-fc87-4267-a443-9c6d791e6693 |
+ | 37 | 4 | Lights | 6/1/2002 12:00:00 AM | 954178ba-624f-42db-95f6-ca035f36d130 |
+ | 38 | 4 | Locks | 6/1/2002 12:00:00 AM | 19646983-3fa0-4773-9a0c-f34c49df9bc8 |
+ | 39 | 4 | Panniers | 6/1/2002 12:00:00 AM | 3002a5d5-fec3-464b-bef3-e0f81d35f431 |
+ | 40 | 4 | Pumps | 6/1/2002 12:00:00 AM | fe4d46f2-c87c-48c5-a4a1-3f55712d80b1 |
+ | 41 | 4 | Tires and Tubes | 6/1/2002 12:00:00 AM | 3c17c9ae-e906-48b4-bdd3-60e28d47dcdf |
+ | 42 | | Record to Delete | 6/1/2005 12:00:00 AM | 3c17c9ae-e906-48b4-bdd3-000000000001 |
+
+Scenario: FindAllAsync_0_500_Sort_ProductCategoryId
+ When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
+ | PageNumber | PageSize | Sorting |
+ | 0 | 500 | ProductCategoryId |
+ And I call the method 'FindAllAsync' with the parameter values
+ | Key | Value | TypeName |
+ | pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 1 | 42 | 100 | 0 |
+ And the sorted results are
+ | ProductCategoryId | ParentProductCategoryId | Name | ModifiedDate | Rowguid |
+ | 1 | | Bikes | 6/1/2002 12:00:00 AM | cfbda25c-df71-47a7-b81b-64ee161aa37c |
+ | 2 | | Components | 6/1/2002 12:00:00 AM | c657828d-d808-4aba-91a3-af2ce02300e9 |
+ | 3 | | Clothing | 6/1/2002 12:00:00 AM | 10a7c342-ca82-48d4-8a38-46a2eb089b74 |
+ | 4 | | Accessories | 6/1/2002 12:00:00 AM | 2be3be36-d9a2-4eee-b593-ed895d97c2a6 |
+ | 5 | 1 | Mountain Bikes | 6/1/2002 12:00:00 AM | 2d364ade-264a-433c-b092-4fcbf3804e01 |
+ | 6 | 1 | Road Bikes | 6/1/2002 12:00:00 AM | 000310c0-bcc8-42c4-b0c3-45ae611af06b |
+ | 7 | 1 | Touring Bikes | 6/1/2002 12:00:00 AM | 02c5061d-ecdc-4274-b5f1-e91d76bc3f37 |
+ | 8 | 2 | Handlebars | 6/1/2002 12:00:00 AM | 3ef2c725-7135-4c85-9ae6-ae9a3bdd9283 |
+ | 9 | 2 | Bottom Brackets | 6/1/2002 12:00:00 AM | a9e54089-8a1e-4cf5-8646-e3801f685934 |
+ | 10 | 2 | Brakes | 6/1/2002 12:00:00 AM | d43ba4a3-ef0d-426b-90eb-4be4547dd30c |
+ | 11 | 2 | Chains | 6/1/2002 12:00:00 AM | e93a7231-f16c-4b0f-8c41-c73fdec62da0 |
+ | 12 | 2 | Cranksets | 6/1/2002 12:00:00 AM | 4f644521-422b-4f19-974a-e3df6102567e |
+ | 13 | 2 | Derailleurs | 6/1/2002 12:00:00 AM | 1830d70c-aa2a-40c0-a271-5ba86f38f8bf |
+ | 14 | 2 | Forks | 6/1/2002 12:00:00 AM | b5f9ba42-b69b-4fdd-b2ec-57fb7b42e3cf |
+ | 15 | 2 | Headsets | 6/1/2002 12:00:00 AM | 7c782bbe-5a16-495a-aa50-10afe5a84af2 |
+ | 16 | 2 | Mountain Frames | 6/1/2002 12:00:00 AM | 61b21b65-e16a-4be7-9300-4d8e9db861be |
+ | 17 | 2 | Pedals | 6/1/2002 12:00:00 AM | 6d24ac07-7a84-4849-864a-865a14125bc9 |
+ | 18 | 2 | Road Frames | 6/1/2002 12:00:00 AM | 5515f857-075b-4f9a-87b7-43b4997077b3 |
+ | 19 | 2 | Saddles | 6/1/2002 12:00:00 AM | 049fffa3-9d30-46df-82f7-f20730ec02b3 |
+ | 20 | 2 | Touring Frames | 6/1/2002 12:00:00 AM | d2e3f1a8-56c4-4f36-b29d-5659fc0d2789 |
+ | 21 | 2 | Wheels | 6/1/2002 12:00:00 AM | 43521287-4b0b-438e-b80e-d82d9ad7c9f0 |
+ | 22 | 3 | Bib-Shorts | 6/1/2002 12:00:00 AM | 67b58d2b-5798-4a90-8c6c-5ddacf057171 |
+ | 23 | 3 | Caps | 6/1/2002 12:00:00 AM | 430dd6a8-a755-4b23-bb05-52520107da5f |
+ | 24 | 3 | Gloves | 6/1/2002 12:00:00 AM | 92d5657b-0032-4e49-bad5-41a441a70942 |
+ | 25 | 3 | Jerseys | 6/1/2002 12:00:00 AM | 09e91437-ba4f-4b1a-8215-74184fd95db8 |
+ | 26 | 3 | Shorts | 6/1/2002 12:00:00 AM | 1a5ba5b3-03c3-457c-b11e-4fa85ede87da |
+ | 27 | 3 | Socks | 6/1/2002 12:00:00 AM | 701019c3-09fe-4949-8386-c6ce686474e5 |
+ | 28 | 3 | Tights | 6/1/2002 12:00:00 AM | 5deb3e55-9897-4416-b18a-515e970bc2d1 |
+ | 29 | 3 | Vests | 6/1/2002 12:00:00 AM | 9ad7fe93-5ba0-4736-b578-ff80a2071297 |
+ | 30 | 4 | Bike Racks | 6/1/2002 12:00:00 AM | 4624b5ce-66d6-496b-9201-c053df3556cc |
+ | 31 | 4 | Bike Stands | 6/1/2002 12:00:00 AM | 43b445c8-b820-424e-a1d5-90d81da0b46f |
+ | 32 | 4 | Bottles and Cages | 6/1/2002 12:00:00 AM | 9b7dff41-9fa3-4776-8def-2c9a48c8b779 |
+ | 33 | 4 | Cleaners | 6/1/2002 12:00:00 AM | 9ad3bcf0-244d-4ec4-a6a0-fb701351c6a3 |
+ | 34 | 4 | Fenders | 6/1/2002 12:00:00 AM | 1697f8a2-0a08-4883-b7dd-d19117b4e9a7 |
+ | 35 | 4 | Helmets | 6/1/2002 12:00:00 AM | f5e07a33-c9e0-439c-b5f3-9f25fb65becc |
+ | 36 | 4 | Hydration Packs | 6/1/2002 12:00:00 AM | 646a8906-fc87-4267-a443-9c6d791e6693 |
+ | 37 | 4 | Lights | 6/1/2002 12:00:00 AM | 954178ba-624f-42db-95f6-ca035f36d130 |
+ | 38 | 4 | Locks | 6/1/2002 12:00:00 AM | 19646983-3fa0-4773-9a0c-f34c49df9bc8 |
+ | 39 | 4 | Panniers | 6/1/2002 12:00:00 AM | 3002a5d5-fec3-464b-bef3-e0f81d35f431 |
+ | 40 | 4 | Pumps | 6/1/2002 12:00:00 AM | fe4d46f2-c87c-48c5-a4a1-3f55712d80b1 |
+ | 41 | 4 | Tires and Tubes | 6/1/2002 12:00:00 AM | 3c17c9ae-e906-48b4-bdd3-60e28d47dcdf |
+ | 42 | | Record to Delete | 6/1/2005 12:00:00 AM | 3c17c9ae-e906-48b4-bdd3-000000000001 |
+
+
+Scenario: FindAllAsync_0_500_Sort_ProductCategoryIdDesc
+ When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
+ | PageNumber | PageSize | Sorting |
+ | 0 | 500 | ProductCategoryId DESC |
+ And I call the method 'FindAllAsync' with the parameter values
+ | Key | Value | TypeName |
+ | pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 1 | 42 | 100 | 0 |
+ And the sorted results are
+ | ProductCategoryId | ParentProductCategoryId | Name | ModifiedDate | Rowguid |
+ | 42 | | Record to Delete | 6/1/2005 12:00:00 AM | 3c17c9ae-e906-48b4-bdd3-000000000001 |
+ | 41 | 4 | Tires and Tubes | 6/1/2002 12:00:00 AM | 3c17c9ae-e906-48b4-bdd3-60e28d47dcdf |
+ | 40 | 4 | Pumps | 6/1/2002 12:00:00 AM | fe4d46f2-c87c-48c5-a4a1-3f55712d80b1 |
+ | 39 | 4 | Panniers | 6/1/2002 12:00:00 AM | 3002a5d5-fec3-464b-bef3-e0f81d35f431 |
+ | 38 | 4 | Locks | 6/1/2002 12:00:00 AM | 19646983-3fa0-4773-9a0c-f34c49df9bc8 |
+ | 37 | 4 | Lights | 6/1/2002 12:00:00 AM | 954178ba-624f-42db-95f6-ca035f36d130 |
+ | 36 | 4 | Hydration Packs | 6/1/2002 12:00:00 AM | 646a8906-fc87-4267-a443-9c6d791e6693 |
+ | 35 | 4 | Helmets | 6/1/2002 12:00:00 AM | f5e07a33-c9e0-439c-b5f3-9f25fb65becc |
+ | 34 | 4 | Fenders | 6/1/2002 12:00:00 AM | 1697f8a2-0a08-4883-b7dd-d19117b4e9a7 |
+ | 33 | 4 | Cleaners | 6/1/2002 12:00:00 AM | 9ad3bcf0-244d-4ec4-a6a0-fb701351c6a3 |
+ | 32 | 4 | Bottles and Cages | 6/1/2002 12:00:00 AM | 9b7dff41-9fa3-4776-8def-2c9a48c8b779 |
+ | 31 | 4 | Bike Stands | 6/1/2002 12:00:00 AM | 43b445c8-b820-424e-a1d5-90d81da0b46f |
+ | 30 | 4 | Bike Racks | 6/1/2002 12:00:00 AM | 4624b5ce-66d6-496b-9201-c053df3556cc |
+ | 29 | 3 | Vests | 6/1/2002 12:00:00 AM | 9ad7fe93-5ba0-4736-b578-ff80a2071297 |
+ | 28 | 3 | Tights | 6/1/2002 12:00:00 AM | 5deb3e55-9897-4416-b18a-515e970bc2d1 |
+ | 27 | 3 | Socks | 6/1/2002 12:00:00 AM | 701019c3-09fe-4949-8386-c6ce686474e5 |
+ | 26 | 3 | Shorts | 6/1/2002 12:00:00 AM | 1a5ba5b3-03c3-457c-b11e-4fa85ede87da |
+ | 25 | 3 | Jerseys | 6/1/2002 12:00:00 AM | 09e91437-ba4f-4b1a-8215-74184fd95db8 |
+ | 24 | 3 | Gloves | 6/1/2002 12:00:00 AM | 92d5657b-0032-4e49-bad5-41a441a70942 |
+ | 23 | 3 | Caps | 6/1/2002 12:00:00 AM | 430dd6a8-a755-4b23-bb05-52520107da5f |
+ | 22 | 3 | Bib-Shorts | 6/1/2002 12:00:00 AM | 67b58d2b-5798-4a90-8c6c-5ddacf057171 |
+ | 21 | 2 | Wheels | 6/1/2002 12:00:00 AM | 43521287-4b0b-438e-b80e-d82d9ad7c9f0 |
+ | 20 | 2 | Touring Frames | 6/1/2002 12:00:00 AM | d2e3f1a8-56c4-4f36-b29d-5659fc0d2789 |
+ | 19 | 2 | Saddles | 6/1/2002 12:00:00 AM | 049fffa3-9d30-46df-82f7-f20730ec02b3 |
+ | 18 | 2 | Road Frames | 6/1/2002 12:00:00 AM | 5515f857-075b-4f9a-87b7-43b4997077b3 |
+ | 17 | 2 | Pedals | 6/1/2002 12:00:00 AM | 6d24ac07-7a84-4849-864a-865a14125bc9 |
+ | 16 | 2 | Mountain Frames | 6/1/2002 12:00:00 AM | 61b21b65-e16a-4be7-9300-4d8e9db861be |
+ | 15 | 2 | Headsets | 6/1/2002 12:00:00 AM | 7c782bbe-5a16-495a-aa50-10afe5a84af2 |
+ | 14 | 2 | Forks | 6/1/2002 12:00:00 AM | b5f9ba42-b69b-4fdd-b2ec-57fb7b42e3cf |
+ | 13 | 2 | Derailleurs | 6/1/2002 12:00:00 AM | 1830d70c-aa2a-40c0-a271-5ba86f38f8bf |
+ | 12 | 2 | Cranksets | 6/1/2002 12:00:00 AM | 4f644521-422b-4f19-974a-e3df6102567e |
+ | 11 | 2 | Chains | 6/1/2002 12:00:00 AM | e93a7231-f16c-4b0f-8c41-c73fdec62da0 |
+ | 10 | 2 | Brakes | 6/1/2002 12:00:00 AM | d43ba4a3-ef0d-426b-90eb-4be4547dd30c |
+ | 9 | 2 | Bottom Brackets | 6/1/2002 12:00:00 AM | a9e54089-8a1e-4cf5-8646-e3801f685934 |
+ | 8 | 2 | Handlebars | 6/1/2002 12:00:00 AM | 3ef2c725-7135-4c85-9ae6-ae9a3bdd9283 |
+ | 7 | 1 | Touring Bikes | 6/1/2002 12:00:00 AM | 02c5061d-ecdc-4274-b5f1-e91d76bc3f37 |
+ | 6 | 1 | Road Bikes | 6/1/2002 12:00:00 AM | 000310c0-bcc8-42c4-b0c3-45ae611af06b |
+ | 5 | 1 | Mountain Bikes | 6/1/2002 12:00:00 AM | 2d364ade-264a-433c-b092-4fcbf3804e01 |
+ | 4 | | Accessories | 6/1/2002 12:00:00 AM | 2be3be36-d9a2-4eee-b593-ed895d97c2a6 |
+ | 3 | | Clothing | 6/1/2002 12:00:00 AM | 10a7c342-ca82-48d4-8a38-46a2eb089b74 |
+ | 2 | | Components | 6/1/2002 12:00:00 AM | c657828d-d808-4aba-91a3-af2ce02300e9 |
+ | 1 | | Bikes | 6/1/2002 12:00:00 AM | cfbda25c-df71-47a7-b81b-64ee161aa37c |
+
+
+Scenario: FindAllAsync_0_500_Sort_ProductCategoryIdASC
+ When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
+ | PageNumber | PageSize | Sorting |
+ | 0 | 500 | ProductCategoryId ASC |
+ And I call the method 'FindAllAsync' with the parameter values
+ | Key | Value | TypeName |
+ | pageingFilter | {{model}} | AdventureWorksDemo.Data.Paging.PagingFilter |
+ Then the result is of type
+ | Expected |
+ | AdventureWorksDemo.Data.Paging.PagedList |
+ And the PagedList values are
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 1 | 42 | 100 | 0 |
+ And the sorted results are
| ProductCategoryId | ParentProductCategoryId | Name | ModifiedDate | Rowguid |
| 1 | | Bikes | 6/1/2002 12:00:00 AM | cfbda25c-df71-47a7-b81b-64ee161aa37c |
| 2 | | Components | 6/1/2002 12:00:00 AM | c657828d-d808-4aba-91a3-af2ce02300e9 |
@@ -128,15 +305,15 @@ Scenario: FindAllAsync_2_5
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage |
- | 9 | 42 | 5 | 2 |
- And the results are
- | ModifiedDate | Name | ParentProductCategoryId | ProductCategoryId | Rowguid |
- | 6/1/2002 12:00:00 AM | Road Bikes | 1 | 6 | 000310c0-bcc8-42c4-b0c3-45ae611af06b |
- | 6/1/2002 12:00:00 AM | Touring Bikes | 1 | 7 | 02c5061d-ecdc-4274-b5f1-e91d76bc3f37 |
- | 6/1/2002 12:00:00 AM | Handlebars | 2 | 8 | 3ef2c725-7135-4c85-9ae6-ae9a3bdd9283 |
- | 6/1/2002 12:00:00 AM | Bottom Brackets | 2 | 9 | a9e54089-8a1e-4cf5-8646-e3801f685934 |
- | 6/1/2002 12:00:00 AM | Brakes | 2 | 10 | d43ba4a3-ef0d-426b-90eb-4be4547dd30c |
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 9 | 42 | 5 | 2 |
+ And the sorted results are
+ | ModifiedDate | Name | ParentProductCategoryId | ProductCategoryId | Rowguid |
+ | 6/1/2002 12:00:00 AM | Chains | 2 | 11 | e93a7231-f16c-4b0f-8c41-c73fdec62da0 |
+ | 6/1/2002 12:00:00 AM | Cranksets | 2 | 12 | 4f644521-422b-4f19-974a-e3df6102567e |
+ | 6/1/2002 12:00:00 AM | Derailleurs | 2 | 13 | 1830d70c-aa2a-40c0-a271-5ba86f38f8bf |
+ | 6/1/2002 12:00:00 AM | Forks | 2 | 14 | b5f9ba42-b69b-4fdd-b2ec-57fb7b42e3cf |
+ | 6/1/2002 12:00:00 AM | Headsets | 2 | 15 | 7c782bbe-5a16-495a-aa50-10afe5a84af2 |
Scenario: FindAllAsync_2_8
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
@@ -149,18 +326,18 @@ Scenario: FindAllAsync_2_8
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage |
- | 6 | 42 | 8 | 2 |
- And the results are
- | ModifiedDate | Name | ParentProductCategoryId | ProductCategoryId | Rowguid |
- | 6/1/2002 12:00:00 AM | Bottom Brackets | 2 | 9 | a9e54089-8a1e-4cf5-8646-e3801f685934 |
- | 6/1/2002 12:00:00 AM | Brakes | 2 | 10 | d43ba4a3-ef0d-426b-90eb-4be4547dd30c |
- | 6/1/2002 12:00:00 AM | Chains | 2 | 11 | e93a7231-f16c-4b0f-8c41-c73fdec62da0 |
- | 6/1/2002 12:00:00 AM | Cranksets | 2 | 12 | 4f644521-422b-4f19-974a-e3df6102567e |
- | 6/1/2002 12:00:00 AM | Derailleurs | 2 | 13 | 1830d70c-aa2a-40c0-a271-5ba86f38f8bf |
- | 6/1/2002 12:00:00 AM | Forks | 2 | 14 | b5f9ba42-b69b-4fdd-b2ec-57fb7b42e3cf |
- | 6/1/2002 12:00:00 AM | Headsets | 2 | 15 | 7c782bbe-5a16-495a-aa50-10afe5a84af2 |
- | 6/1/2002 12:00:00 AM | Mountain Frames | 2 | 16 | 61b21b65-e16a-4be7-9300-4d8e9db861be |
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 6 | 42 | 8 | 2 |
+ And the sorted results are
+ | ModifiedDate | Name | ParentProductCategoryId | ProductCategoryId | Rowguid |
+ | 6/1/2002 12:00:00 AM | Pedals | 2 | 17 | 6d24ac07-7a84-4849-864a-865a14125bc9 |
+ | 6/1/2002 12:00:00 AM | Road Frames | 2 | 18 | 5515f857-075b-4f9a-87b7-43b4997077b3 |
+ | 6/1/2002 12:00:00 AM | Saddles | 2 | 19 | 049fffa3-9d30-46df-82f7-f20730ec02b3 |
+ | 6/1/2002 12:00:00 AM | Touring Frames | 2 | 20 | d2e3f1a8-56c4-4f36-b29d-5659fc0d2789 |
+ | 6/1/2002 12:00:00 AM | Wheels | 2 | 21 | 43521287-4b0b-438e-b80e-d82d9ad7c9f0 |
+ | 6/1/2002 12:00:00 AM | Bib-Shorts | 3 | 22 | 67b58d2b-5798-4a90-8c6c-5ddacf057171 |
+ | 6/1/2002 12:00:00 AM | Caps | 3 | 23 | 430dd6a8-a755-4b23-bb05-52520107da5f |
+ | 6/1/2002 12:00:00 AM | Gloves | 3 | 24 | 92d5657b-0032-4e49-bad5-41a441a70942 |
Scenario: FindAllAsync_1234_5
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
@@ -173,10 +350,12 @@ Scenario: FindAllAsync_1234_5
| Expected |
| AdventureWorksDemo.Data.Paging.PagedList |
And the PagedList values are
- | TotalPages | TotalCount | PageSize | CurrentPage |
- | 9 | 42 | 5 | 1234 |
- And the results are
- | ModifiedDate | Name | ParentProductCategoryId | ProductCategoryId | Rowguid |
+ | TotalPages | TotalCount | PageSize | CurrentPage |
+ | 9 | 42 | 5 | 8 |
+ And the sorted results are
+ | ModifiedDate | Name | ParentProductCategoryId | ProductCategoryId | Rowguid |
+ | 6/1/2002 12:00:00 AM | Tires and Tubes | 4 | 41 | 3c17c9ae-e906-48b4-bdd3-60e28d47dcdf |
+ | 6/1/2005 12:00:00 AM | Record to Delete | | 42 | 3c17c9ae-e906-48b4-bdd3-000000000001 |
Scenario: FindAllAsync_0_5
When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter'
@@ -191,8 +370,8 @@ Scenario: FindAllAsync_0_5
And the PagedList values are
| TotalPages | TotalCount | PageSize | CurrentPage |
- | 9 | 42 | 5 | 1 |
- And the results are
+ | 9 | 42 | 5 | 0 |
+ And the sorted results are
| ModifiedDate | Name | ParentProductCategoryId | ProductCategoryId | Rowguid |
| 6/1/2002 12:00:00 AM | Bikes | | 1 | cfbda25c-df71-47a7-b81b-64ee161aa37c |
| 6/1/2002 12:00:00 AM | Components | | 2 | c657828d-d808-4aba-91a3-af2ce02300e9 |
@@ -213,8 +392,8 @@ Scenario: FindAllAsync_0_0
And the PagedList values are
| TotalPages | TotalCount | PageSize | CurrentPage |
- | 2 | 42 | 25 | 1 |
- And the results are
+ | 2 | 42 | 25 | 0 |
+ And the sorted results are
| ModifiedDate | Name | ParentProductCategoryId | ProductCategoryId | Rowguid |
| 6/1/2002 12:00:00 AM | Bikes | | 1 | cfbda25c-df71-47a7-b81b-64ee161aa37c |
| 6/1/2002 12:00:00 AM | Components | | 2 | c657828d-d808-4aba-91a3-af2ce02300e9 |
@@ -255,6 +434,24 @@ Scenario: FindAllAsync_5_0
And the PagedList values are
| TotalPages | TotalCount | PageSize | CurrentPage |
- | 2 | 42 | 25 | 5 |
- And the results are
- | ModifiedDate | Name | ParentProductCategoryId | ProductCategoryId | Rowguid |
+ | 2 | 42 | 25 | 1 |
+ And the sorted results are
+ | ModifiedDate | Name | ParentProductCategoryId | ProductCategoryId | Rowguid |
+ | 6/1/2002 12:00:00 AM | Shorts | 3 | 26 | 1a5ba5b3-03c3-457c-b11e-4fa85ede87da |
+ | 6/1/2002 12:00:00 AM | Socks | 3 | 27 | 701019c3-09fe-4949-8386-c6ce686474e5 |
+ | 6/1/2002 12:00:00 AM | Tights | 3 | 28 | 5deb3e55-9897-4416-b18a-515e970bc2d1 |
+ | 6/1/2002 12:00:00 AM | Vests | 3 | 29 | 9ad7fe93-5ba0-4736-b578-ff80a2071297 |
+ | 6/1/2002 12:00:00 AM | Bike Racks | 4 | 30 | 4624b5ce-66d6-496b-9201-c053df3556cc |
+ | 6/1/2002 12:00:00 AM | Bike Stands | 4 | 31 | 43b445c8-b820-424e-a1d5-90d81da0b46f |
+ | 6/1/2002 12:00:00 AM | Bottles and Cages | 4 | 32 | 9b7dff41-9fa3-4776-8def-2c9a48c8b779 |
+ | 6/1/2002 12:00:00 AM | Cleaners | 4 | 33 | 9ad3bcf0-244d-4ec4-a6a0-fb701351c6a3 |
+ | 6/1/2002 12:00:00 AM | Fenders | 4 | 34 | 1697f8a2-0a08-4883-b7dd-d19117b4e9a7 |
+ | 6/1/2002 12:00:00 AM | Helmets | 4 | 35 | f5e07a33-c9e0-439c-b5f3-9f25fb65becc |
+ | 6/1/2002 12:00:00 AM | Hydration Packs | 4 | 36 | 646a8906-fc87-4267-a443-9c6d791e6693 |
+ | 6/1/2002 12:00:00 AM | Lights | 4 | 37 | 954178ba-624f-42db-95f6-ca035f36d130 |
+ | 6/1/2002 12:00:00 AM | Locks | 4 | 38 | 19646983-3fa0-4773-9a0c-f34c49df9bc8 |
+ | 6/1/2002 12:00:00 AM | Panniers | 4 | 39 | 3002a5d5-fec3-464b-bef3-e0f81d35f431 |
+ | 6/1/2002 12:00:00 AM | Pumps | 4 | 40 | fe4d46f2-c87c-48c5-a4a1-3f55712d80b1 |
+ | 6/1/2002 12:00:00 AM | Tires and Tubes | 4 | 41 | 3c17c9ae-e906-48b4-bdd3-60e28d47dcdf |
+ | 6/1/2005 12:00:00 AM | Record to Delete | | 42 | 3c17c9ae-e906-48b4-bdd3-000000000001 |
+
diff --git a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceFindTests.feature.cs b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceFindTests.feature.cs
index 97a4a8c..79a52b4 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceFindTests.feature.cs
+++ b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceFindTests.feature.cs
@@ -126,38 +126,38 @@ public async System.Threading.Tasks.Task FindAsync01()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table355 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table450 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table355.AddRow(new string[] {
+ table450.AddRow(new string[] {
"productCategoryId",
"1",
"int"});
#line 11
- await testRunner.WhenAsync("I call the method \'FindAsync\' with the parameter values", ((string)(null)), table355, "When ");
+ await testRunner.WhenAsync("I call the method \'FindAsync\' with the parameter values", ((string)(null)), table450, "When ");
#line hidden
- global::Reqnroll.Table table356 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table451 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table356.AddRow(new string[] {
+ table451.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 14
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table356, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table451, "Then ");
#line hidden
- global::Reqnroll.Table table357 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table452 = new global::Reqnroll.Table(new string[] {
"ModifiedDate",
"Name",
"ParentProductCategoryId",
"ProductCategoryId",
"Rowguid"});
- table357.AddRow(new string[] {
+ table452.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Bikes",
"",
"1",
"cfbda25c-df71-47a7-b81b-64ee161aa37c"});
#line 17
- await testRunner.AndAsync("the result is", ((string)(null)), table357, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table452, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -184,38 +184,38 @@ public async System.Threading.Tasks.Task FindAsync04()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table358 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table453 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table358.AddRow(new string[] {
+ table453.AddRow(new string[] {
"productCategoryId",
"4",
"int"});
#line 22
- await testRunner.WhenAsync("I call the method \'FindAsync\' with the parameter values", ((string)(null)), table358, "When ");
+ await testRunner.WhenAsync("I call the method \'FindAsync\' with the parameter values", ((string)(null)), table453, "When ");
#line hidden
- global::Reqnroll.Table table359 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table454 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table359.AddRow(new string[] {
+ table454.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 25
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table359, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table454, "Then ");
#line hidden
- global::Reqnroll.Table table360 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table455 = new global::Reqnroll.Table(new string[] {
"ModifiedDate",
"Name",
"ParentProductCategoryId",
"ProductCategoryId",
"Rowguid"});
- table360.AddRow(new string[] {
+ table455.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Accessories",
"",
"4",
"2be3be36-d9a2-4eee-b593-ed895d97c2a6"});
#line 28
- await testRunner.AndAsync("the result is", ((string)(null)), table360, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table455, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -242,23 +242,23 @@ public async System.Threading.Tasks.Task FindAsync1234()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table361 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table456 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table361.AddRow(new string[] {
+ table456.AddRow(new string[] {
"productCategoryId",
"1234",
"int"});
#line 33
- await testRunner.WhenAsync("I call the method \'FindAsync\' with the parameter values", ((string)(null)), table361, "When ");
+ await testRunner.WhenAsync("I call the method \'FindAsync\' with the parameter values", ((string)(null)), table456, "When ");
#line hidden
- global::Reqnroll.Table table362 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table457 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table362.AddRow(new string[] {
+ table457.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 37
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table362, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table457, "Then ");
#line hidden
#line 40
await testRunner.AndAsync("the result is null", ((string)(null)), ((global::Reqnroll.Table)(null)), "And ");
@@ -288,99 +288,1084 @@ public async System.Threading.Tasks.Task FindAllAsync_1_5()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table363 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table458 = new global::Reqnroll.Table(new string[] {
"PageNumber",
"PageSize"});
- table363.AddRow(new string[] {
+ table458.AddRow(new string[] {
"1",
"5"});
#line 43
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table363, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table458, "When ");
#line hidden
- global::Reqnroll.Table table364 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table459 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table364.AddRow(new string[] {
+ table459.AddRow(new string[] {
"pageingFilter",
"{{model}}",
"AdventureWorksDemo.Data.Paging.PagingFilter"});
#line 46
- await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table364, "And ");
+ await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table459, "And ");
#line hidden
- global::Reqnroll.Table table365 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table460 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table365.AddRow(new string[] {
+ table460.AddRow(new string[] {
"AdventureWorksDemo.Data.Paging.PagedList"});
#line 49
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table365, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table460, "Then ");
#line hidden
- global::Reqnroll.Table table366 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table461 = new global::Reqnroll.Table(new string[] {
"TotalPages",
"TotalCount",
"PageSize",
"CurrentPage"});
- table366.AddRow(new string[] {
+ table461.AddRow(new string[] {
"9",
"42",
"5",
"1"});
#line 52
- await testRunner.AndAsync("the PagedList values are", ((string)(null)), table366, "And ");
+ await testRunner.AndAsync("the PagedList values are", ((string)(null)), table461, "And ");
#line hidden
- global::Reqnroll.Table table367 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table462 = new global::Reqnroll.Table(new string[] {
"ModifiedDate",
"Name",
"ParentProductCategoryId",
"ProductCategoryId",
"Rowguid"});
- table367.AddRow(new string[] {
+ table462.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
- "Accessories",
+ "Road Bikes",
+ "1",
+ "6",
+ "000310c0-bcc8-42c4-b0c3-45ae611af06b"});
+ table462.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Touring Bikes",
+ "1",
+ "7",
+ "02c5061d-ecdc-4274-b5f1-e91d76bc3f37"});
+ table462.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Handlebars",
+ "2",
+ "8",
+ "3ef2c725-7135-4c85-9ae6-ae9a3bdd9283"});
+ table462.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Bottom Brackets",
+ "2",
+ "9",
+ "a9e54089-8a1e-4cf5-8646-e3801f685934"});
+ table462.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Brakes",
+ "2",
+ "10",
+ "d43ba4a3-ef0d-426b-90eb-4be4547dd30c"});
+#line 55
+ await testRunner.AndAsync("the sorted results are", ((string)(null)), table462, "And ");
+#line hidden
+ }
+ await this.ScenarioCleanupAsync();
+ }
+
+ [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()]
+ [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("FindAllAsync_0_500")]
+ [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ProductCategoryServiceFindTests")]
+ public async System.Threading.Tasks.Task FindAllAsync_0_500()
+ {
+ string[] tagsOfScenario = ((string[])(null));
+ System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
+ global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("FindAllAsync_0_500", null, tagsOfScenario, argumentsOfScenario, featureTags);
+#line 64
+this.ScenarioInitialize(scenarioInfo);
+#line hidden
+ if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags)))
+ {
+ testRunner.SkipScenario();
+ }
+ else
+ {
+ await this.ScenarioStartAsync();
+#line 7
+await this.FeatureBackgroundAsync();
+#line hidden
+ global::Reqnroll.Table table463 = new global::Reqnroll.Table(new string[] {
+ "PageNumber",
+ "PageSize"});
+ table463.AddRow(new string[] {
+ "0",
+ "500"});
+#line 65
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table463, "When ");
+#line hidden
+ global::Reqnroll.Table table464 = new global::Reqnroll.Table(new string[] {
+ "Key",
+ "Value",
+ "TypeName"});
+ table464.AddRow(new string[] {
+ "pageingFilter",
+ "{{model}}",
+ "AdventureWorksDemo.Data.Paging.PagingFilter"});
+#line 68
+ await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table464, "And ");
+#line hidden
+ global::Reqnroll.Table table465 = new global::Reqnroll.Table(new string[] {
+ "Expected"});
+ table465.AddRow(new string[] {
+ "AdventureWorksDemo.Data.Paging.PagedList"});
+#line 71
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table465, "Then ");
+#line hidden
+ global::Reqnroll.Table table466 = new global::Reqnroll.Table(new string[] {
+ "TotalPages",
+ "TotalCount",
+ "PageSize",
+ "CurrentPage"});
+ table466.AddRow(new string[] {
+ "1",
+ "42",
+ "100",
+ "0"});
+#line 74
+ await testRunner.AndAsync("the PagedList values are", ((string)(null)), table466, "And ");
+#line hidden
+ global::Reqnroll.Table table467 = new global::Reqnroll.Table(new string[] {
+ "ProductCategoryId",
+ "ParentProductCategoryId",
+ "Name",
+ "ModifiedDate",
+ "Rowguid"});
+ table467.AddRow(new string[] {
+ "1",
"",
+ "Bikes",
+ "6/1/2002 12:00:00 AM",
+ "cfbda25c-df71-47a7-b81b-64ee161aa37c"});
+ table467.AddRow(new string[] {
+ "2",
+ "",
+ "Components",
+ "6/1/2002 12:00:00 AM",
+ "c657828d-d808-4aba-91a3-af2ce02300e9"});
+ table467.AddRow(new string[] {
+ "3",
+ "",
+ "Clothing",
+ "6/1/2002 12:00:00 AM",
+ "10a7c342-ca82-48d4-8a38-46a2eb089b74"});
+ table467.AddRow(new string[] {
"4",
+ "",
+ "Accessories",
+ "6/1/2002 12:00:00 AM",
"2be3be36-d9a2-4eee-b593-ed895d97c2a6"});
- table367.AddRow(new string[] {
+ table467.AddRow(new string[] {
+ "5",
+ "1",
+ "Mountain Bikes",
+ "6/1/2002 12:00:00 AM",
+ "2d364ade-264a-433c-b092-4fcbf3804e01"});
+ table467.AddRow(new string[] {
+ "6",
+ "1",
+ "Road Bikes",
+ "6/1/2002 12:00:00 AM",
+ "000310c0-bcc8-42c4-b0c3-45ae611af06b"});
+ table467.AddRow(new string[] {
+ "7",
+ "1",
+ "Touring Bikes",
+ "6/1/2002 12:00:00 AM",
+ "02c5061d-ecdc-4274-b5f1-e91d76bc3f37"});
+ table467.AddRow(new string[] {
+ "8",
+ "2",
+ "Handlebars",
+ "6/1/2002 12:00:00 AM",
+ "3ef2c725-7135-4c85-9ae6-ae9a3bdd9283"});
+ table467.AddRow(new string[] {
+ "9",
+ "2",
+ "Bottom Brackets",
+ "6/1/2002 12:00:00 AM",
+ "a9e54089-8a1e-4cf5-8646-e3801f685934"});
+ table467.AddRow(new string[] {
+ "10",
+ "2",
+ "Brakes",
+ "6/1/2002 12:00:00 AM",
+ "d43ba4a3-ef0d-426b-90eb-4be4547dd30c"});
+ table467.AddRow(new string[] {
+ "11",
+ "2",
+ "Chains",
+ "6/1/2002 12:00:00 AM",
+ "e93a7231-f16c-4b0f-8c41-c73fdec62da0"});
+ table467.AddRow(new string[] {
+ "12",
+ "2",
+ "Cranksets",
+ "6/1/2002 12:00:00 AM",
+ "4f644521-422b-4f19-974a-e3df6102567e"});
+ table467.AddRow(new string[] {
+ "13",
+ "2",
+ "Derailleurs",
+ "6/1/2002 12:00:00 AM",
+ "1830d70c-aa2a-40c0-a271-5ba86f38f8bf"});
+ table467.AddRow(new string[] {
+ "14",
+ "2",
+ "Forks",
+ "6/1/2002 12:00:00 AM",
+ "b5f9ba42-b69b-4fdd-b2ec-57fb7b42e3cf"});
+ table467.AddRow(new string[] {
+ "15",
+ "2",
+ "Headsets",
+ "6/1/2002 12:00:00 AM",
+ "7c782bbe-5a16-495a-aa50-10afe5a84af2"});
+ table467.AddRow(new string[] {
+ "16",
+ "2",
+ "Mountain Frames",
+ "6/1/2002 12:00:00 AM",
+ "61b21b65-e16a-4be7-9300-4d8e9db861be"});
+ table467.AddRow(new string[] {
+ "17",
+ "2",
+ "Pedals",
+ "6/1/2002 12:00:00 AM",
+ "6d24ac07-7a84-4849-864a-865a14125bc9"});
+ table467.AddRow(new string[] {
+ "18",
+ "2",
+ "Road Frames",
+ "6/1/2002 12:00:00 AM",
+ "5515f857-075b-4f9a-87b7-43b4997077b3"});
+ table467.AddRow(new string[] {
+ "19",
+ "2",
+ "Saddles",
+ "6/1/2002 12:00:00 AM",
+ "049fffa3-9d30-46df-82f7-f20730ec02b3"});
+ table467.AddRow(new string[] {
+ "20",
+ "2",
+ "Touring Frames",
+ "6/1/2002 12:00:00 AM",
+ "d2e3f1a8-56c4-4f36-b29d-5659fc0d2789"});
+ table467.AddRow(new string[] {
+ "21",
+ "2",
+ "Wheels",
+ "6/1/2002 12:00:00 AM",
+ "43521287-4b0b-438e-b80e-d82d9ad7c9f0"});
+ table467.AddRow(new string[] {
+ "22",
+ "3",
+ "Bib-Shorts",
+ "6/1/2002 12:00:00 AM",
+ "67b58d2b-5798-4a90-8c6c-5ddacf057171"});
+ table467.AddRow(new string[] {
+ "23",
+ "3",
+ "Caps",
+ "6/1/2002 12:00:00 AM",
+ "430dd6a8-a755-4b23-bb05-52520107da5f"});
+ table467.AddRow(new string[] {
+ "24",
+ "3",
+ "Gloves",
+ "6/1/2002 12:00:00 AM",
+ "92d5657b-0032-4e49-bad5-41a441a70942"});
+ table467.AddRow(new string[] {
+ "25",
+ "3",
+ "Jerseys",
+ "6/1/2002 12:00:00 AM",
+ "09e91437-ba4f-4b1a-8215-74184fd95db8"});
+ table467.AddRow(new string[] {
+ "26",
+ "3",
+ "Shorts",
+ "6/1/2002 12:00:00 AM",
+ "1a5ba5b3-03c3-457c-b11e-4fa85ede87da"});
+ table467.AddRow(new string[] {
+ "27",
+ "3",
+ "Socks",
+ "6/1/2002 12:00:00 AM",
+ "701019c3-09fe-4949-8386-c6ce686474e5"});
+ table467.AddRow(new string[] {
+ "28",
+ "3",
+ "Tights",
+ "6/1/2002 12:00:00 AM",
+ "5deb3e55-9897-4416-b18a-515e970bc2d1"});
+ table467.AddRow(new string[] {
+ "29",
+ "3",
+ "Vests",
+ "6/1/2002 12:00:00 AM",
+ "9ad7fe93-5ba0-4736-b578-ff80a2071297"});
+ table467.AddRow(new string[] {
+ "30",
+ "4",
+ "Bike Racks",
+ "6/1/2002 12:00:00 AM",
+ "4624b5ce-66d6-496b-9201-c053df3556cc"});
+ table467.AddRow(new string[] {
+ "31",
+ "4",
+ "Bike Stands",
+ "6/1/2002 12:00:00 AM",
+ "43b445c8-b820-424e-a1d5-90d81da0b46f"});
+ table467.AddRow(new string[] {
+ "32",
+ "4",
+ "Bottles and Cages",
+ "6/1/2002 12:00:00 AM",
+ "9b7dff41-9fa3-4776-8def-2c9a48c8b779"});
+ table467.AddRow(new string[] {
+ "33",
+ "4",
+ "Cleaners",
+ "6/1/2002 12:00:00 AM",
+ "9ad3bcf0-244d-4ec4-a6a0-fb701351c6a3"});
+ table467.AddRow(new string[] {
+ "34",
+ "4",
+ "Fenders",
+ "6/1/2002 12:00:00 AM",
+ "1697f8a2-0a08-4883-b7dd-d19117b4e9a7"});
+ table467.AddRow(new string[] {
+ "35",
+ "4",
+ "Helmets",
+ "6/1/2002 12:00:00 AM",
+ "f5e07a33-c9e0-439c-b5f3-9f25fb65becc"});
+ table467.AddRow(new string[] {
+ "36",
+ "4",
+ "Hydration Packs",
+ "6/1/2002 12:00:00 AM",
+ "646a8906-fc87-4267-a443-9c6d791e6693"});
+ table467.AddRow(new string[] {
+ "37",
+ "4",
+ "Lights",
+ "6/1/2002 12:00:00 AM",
+ "954178ba-624f-42db-95f6-ca035f36d130"});
+ table467.AddRow(new string[] {
+ "38",
+ "4",
+ "Locks",
+ "6/1/2002 12:00:00 AM",
+ "19646983-3fa0-4773-9a0c-f34c49df9bc8"});
+ table467.AddRow(new string[] {
+ "39",
+ "4",
+ "Panniers",
+ "6/1/2002 12:00:00 AM",
+ "3002a5d5-fec3-464b-bef3-e0f81d35f431"});
+ table467.AddRow(new string[] {
+ "40",
+ "4",
+ "Pumps",
+ "6/1/2002 12:00:00 AM",
+ "fe4d46f2-c87c-48c5-a4a1-3f55712d80b1"});
+ table467.AddRow(new string[] {
+ "41",
+ "4",
+ "Tires and Tubes",
+ "6/1/2002 12:00:00 AM",
+ "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
+ table467.AddRow(new string[] {
+ "42",
+ "",
+ "Record to Delete",
+ "6/1/2005 12:00:00 AM",
+ "3c17c9ae-e906-48b4-bdd3-000000000001"});
+#line 77
+ await testRunner.AndAsync("the sorted results are", ((string)(null)), table467, "And ");
+#line hidden
+ }
+ await this.ScenarioCleanupAsync();
+ }
+
+ [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()]
+ [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("FindAllAsync_0_500_Sort_ProductCategoryId")]
+ [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ProductCategoryServiceFindTests")]
+ public async System.Threading.Tasks.Task FindAllAsync_0_500_Sort_ProductCategoryId()
+ {
+ string[] tagsOfScenario = ((string[])(null));
+ System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
+ global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("FindAllAsync_0_500_Sort_ProductCategoryId", null, tagsOfScenario, argumentsOfScenario, featureTags);
+#line 122
+this.ScenarioInitialize(scenarioInfo);
+#line hidden
+ if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags)))
+ {
+ testRunner.SkipScenario();
+ }
+ else
+ {
+ await this.ScenarioStartAsync();
+#line 7
+await this.FeatureBackgroundAsync();
+#line hidden
+ global::Reqnroll.Table table468 = new global::Reqnroll.Table(new string[] {
+ "PageNumber",
+ "PageSize",
+ "Sorting"});
+ table468.AddRow(new string[] {
+ "0",
+ "500",
+ "ProductCategoryId"});
+#line 123
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table468, "When ");
+#line hidden
+ global::Reqnroll.Table table469 = new global::Reqnroll.Table(new string[] {
+ "Key",
+ "Value",
+ "TypeName"});
+ table469.AddRow(new string[] {
+ "pageingFilter",
+ "{{model}}",
+ "AdventureWorksDemo.Data.Paging.PagingFilter"});
+#line 126
+ await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table469, "And ");
+#line hidden
+ global::Reqnroll.Table table470 = new global::Reqnroll.Table(new string[] {
+ "Expected"});
+ table470.AddRow(new string[] {
+ "AdventureWorksDemo.Data.Paging.PagedList"});
+#line 129
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table470, "Then ");
+#line hidden
+ global::Reqnroll.Table table471 = new global::Reqnroll.Table(new string[] {
+ "TotalPages",
+ "TotalCount",
+ "PageSize",
+ "CurrentPage"});
+ table471.AddRow(new string[] {
+ "1",
+ "42",
+ "100",
+ "0"});
+#line 132
+ await testRunner.AndAsync("the PagedList values are", ((string)(null)), table471, "And ");
+#line hidden
+ global::Reqnroll.Table table472 = new global::Reqnroll.Table(new string[] {
+ "ProductCategoryId",
+ "ParentProductCategoryId",
+ "Name",
+ "ModifiedDate",
+ "Rowguid"});
+ table472.AddRow(new string[] {
+ "1",
+ "",
+ "Bikes",
+ "6/1/2002 12:00:00 AM",
+ "cfbda25c-df71-47a7-b81b-64ee161aa37c"});
+ table472.AddRow(new string[] {
+ "2",
+ "",
+ "Components",
+ "6/1/2002 12:00:00 AM",
+ "c657828d-d808-4aba-91a3-af2ce02300e9"});
+ table472.AddRow(new string[] {
+ "3",
+ "",
+ "Clothing",
+ "6/1/2002 12:00:00 AM",
+ "10a7c342-ca82-48d4-8a38-46a2eb089b74"});
+ table472.AddRow(new string[] {
+ "4",
+ "",
+ "Accessories",
+ "6/1/2002 12:00:00 AM",
+ "2be3be36-d9a2-4eee-b593-ed895d97c2a6"});
+ table472.AddRow(new string[] {
+ "5",
+ "1",
+ "Mountain Bikes",
+ "6/1/2002 12:00:00 AM",
+ "2d364ade-264a-433c-b092-4fcbf3804e01"});
+ table472.AddRow(new string[] {
+ "6",
+ "1",
+ "Road Bikes",
+ "6/1/2002 12:00:00 AM",
+ "000310c0-bcc8-42c4-b0c3-45ae611af06b"});
+ table472.AddRow(new string[] {
+ "7",
+ "1",
+ "Touring Bikes",
+ "6/1/2002 12:00:00 AM",
+ "02c5061d-ecdc-4274-b5f1-e91d76bc3f37"});
+ table472.AddRow(new string[] {
+ "8",
+ "2",
+ "Handlebars",
+ "6/1/2002 12:00:00 AM",
+ "3ef2c725-7135-4c85-9ae6-ae9a3bdd9283"});
+ table472.AddRow(new string[] {
+ "9",
+ "2",
+ "Bottom Brackets",
+ "6/1/2002 12:00:00 AM",
+ "a9e54089-8a1e-4cf5-8646-e3801f685934"});
+ table472.AddRow(new string[] {
+ "10",
+ "2",
+ "Brakes",
+ "6/1/2002 12:00:00 AM",
+ "d43ba4a3-ef0d-426b-90eb-4be4547dd30c"});
+ table472.AddRow(new string[] {
+ "11",
+ "2",
+ "Chains",
+ "6/1/2002 12:00:00 AM",
+ "e93a7231-f16c-4b0f-8c41-c73fdec62da0"});
+ table472.AddRow(new string[] {
+ "12",
+ "2",
+ "Cranksets",
+ "6/1/2002 12:00:00 AM",
+ "4f644521-422b-4f19-974a-e3df6102567e"});
+ table472.AddRow(new string[] {
+ "13",
+ "2",
+ "Derailleurs",
+ "6/1/2002 12:00:00 AM",
+ "1830d70c-aa2a-40c0-a271-5ba86f38f8bf"});
+ table472.AddRow(new string[] {
+ "14",
+ "2",
+ "Forks",
+ "6/1/2002 12:00:00 AM",
+ "b5f9ba42-b69b-4fdd-b2ec-57fb7b42e3cf"});
+ table472.AddRow(new string[] {
+ "15",
+ "2",
+ "Headsets",
+ "6/1/2002 12:00:00 AM",
+ "7c782bbe-5a16-495a-aa50-10afe5a84af2"});
+ table472.AddRow(new string[] {
+ "16",
+ "2",
+ "Mountain Frames",
+ "6/1/2002 12:00:00 AM",
+ "61b21b65-e16a-4be7-9300-4d8e9db861be"});
+ table472.AddRow(new string[] {
+ "17",
+ "2",
+ "Pedals",
+ "6/1/2002 12:00:00 AM",
+ "6d24ac07-7a84-4849-864a-865a14125bc9"});
+ table472.AddRow(new string[] {
+ "18",
+ "2",
+ "Road Frames",
+ "6/1/2002 12:00:00 AM",
+ "5515f857-075b-4f9a-87b7-43b4997077b3"});
+ table472.AddRow(new string[] {
+ "19",
+ "2",
+ "Saddles",
+ "6/1/2002 12:00:00 AM",
+ "049fffa3-9d30-46df-82f7-f20730ec02b3"});
+ table472.AddRow(new string[] {
+ "20",
+ "2",
+ "Touring Frames",
+ "6/1/2002 12:00:00 AM",
+ "d2e3f1a8-56c4-4f36-b29d-5659fc0d2789"});
+ table472.AddRow(new string[] {
+ "21",
+ "2",
+ "Wheels",
+ "6/1/2002 12:00:00 AM",
+ "43521287-4b0b-438e-b80e-d82d9ad7c9f0"});
+ table472.AddRow(new string[] {
+ "22",
+ "3",
+ "Bib-Shorts",
+ "6/1/2002 12:00:00 AM",
+ "67b58d2b-5798-4a90-8c6c-5ddacf057171"});
+ table472.AddRow(new string[] {
+ "23",
+ "3",
+ "Caps",
+ "6/1/2002 12:00:00 AM",
+ "430dd6a8-a755-4b23-bb05-52520107da5f"});
+ table472.AddRow(new string[] {
+ "24",
+ "3",
+ "Gloves",
+ "6/1/2002 12:00:00 AM",
+ "92d5657b-0032-4e49-bad5-41a441a70942"});
+ table472.AddRow(new string[] {
+ "25",
+ "3",
+ "Jerseys",
+ "6/1/2002 12:00:00 AM",
+ "09e91437-ba4f-4b1a-8215-74184fd95db8"});
+ table472.AddRow(new string[] {
+ "26",
+ "3",
+ "Shorts",
+ "6/1/2002 12:00:00 AM",
+ "1a5ba5b3-03c3-457c-b11e-4fa85ede87da"});
+ table472.AddRow(new string[] {
+ "27",
+ "3",
+ "Socks",
+ "6/1/2002 12:00:00 AM",
+ "701019c3-09fe-4949-8386-c6ce686474e5"});
+ table472.AddRow(new string[] {
+ "28",
+ "3",
+ "Tights",
+ "6/1/2002 12:00:00 AM",
+ "5deb3e55-9897-4416-b18a-515e970bc2d1"});
+ table472.AddRow(new string[] {
+ "29",
+ "3",
+ "Vests",
+ "6/1/2002 12:00:00 AM",
+ "9ad7fe93-5ba0-4736-b578-ff80a2071297"});
+ table472.AddRow(new string[] {
+ "30",
+ "4",
+ "Bike Racks",
+ "6/1/2002 12:00:00 AM",
+ "4624b5ce-66d6-496b-9201-c053df3556cc"});
+ table472.AddRow(new string[] {
+ "31",
+ "4",
+ "Bike Stands",
+ "6/1/2002 12:00:00 AM",
+ "43b445c8-b820-424e-a1d5-90d81da0b46f"});
+ table472.AddRow(new string[] {
+ "32",
+ "4",
+ "Bottles and Cages",
+ "6/1/2002 12:00:00 AM",
+ "9b7dff41-9fa3-4776-8def-2c9a48c8b779"});
+ table472.AddRow(new string[] {
+ "33",
+ "4",
+ "Cleaners",
+ "6/1/2002 12:00:00 AM",
+ "9ad3bcf0-244d-4ec4-a6a0-fb701351c6a3"});
+ table472.AddRow(new string[] {
+ "34",
+ "4",
+ "Fenders",
+ "6/1/2002 12:00:00 AM",
+ "1697f8a2-0a08-4883-b7dd-d19117b4e9a7"});
+ table472.AddRow(new string[] {
+ "35",
+ "4",
+ "Helmets",
+ "6/1/2002 12:00:00 AM",
+ "f5e07a33-c9e0-439c-b5f3-9f25fb65becc"});
+ table472.AddRow(new string[] {
+ "36",
+ "4",
+ "Hydration Packs",
+ "6/1/2002 12:00:00 AM",
+ "646a8906-fc87-4267-a443-9c6d791e6693"});
+ table472.AddRow(new string[] {
+ "37",
+ "4",
+ "Lights",
+ "6/1/2002 12:00:00 AM",
+ "954178ba-624f-42db-95f6-ca035f36d130"});
+ table472.AddRow(new string[] {
+ "38",
+ "4",
+ "Locks",
+ "6/1/2002 12:00:00 AM",
+ "19646983-3fa0-4773-9a0c-f34c49df9bc8"});
+ table472.AddRow(new string[] {
+ "39",
+ "4",
+ "Panniers",
+ "6/1/2002 12:00:00 AM",
+ "3002a5d5-fec3-464b-bef3-e0f81d35f431"});
+ table472.AddRow(new string[] {
+ "40",
+ "4",
+ "Pumps",
+ "6/1/2002 12:00:00 AM",
+ "fe4d46f2-c87c-48c5-a4a1-3f55712d80b1"});
+ table472.AddRow(new string[] {
+ "41",
+ "4",
+ "Tires and Tubes",
+ "6/1/2002 12:00:00 AM",
+ "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
+ table472.AddRow(new string[] {
+ "42",
+ "",
+ "Record to Delete",
+ "6/1/2005 12:00:00 AM",
+ "3c17c9ae-e906-48b4-bdd3-000000000001"});
+#line 135
+ await testRunner.AndAsync("the sorted results are", ((string)(null)), table472, "And ");
+#line hidden
+ }
+ await this.ScenarioCleanupAsync();
+ }
+
+ [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()]
+ [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("FindAllAsync_0_500_Sort_ProductCategoryIdDesc")]
+ [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ProductCategoryServiceFindTests")]
+ public async System.Threading.Tasks.Task FindAllAsync_0_500_Sort_ProductCategoryIdDesc()
+ {
+ string[] tagsOfScenario = ((string[])(null));
+ System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
+ global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("FindAllAsync_0_500_Sort_ProductCategoryIdDesc", null, tagsOfScenario, argumentsOfScenario, featureTags);
+#line 181
+this.ScenarioInitialize(scenarioInfo);
+#line hidden
+ if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags)))
+ {
+ testRunner.SkipScenario();
+ }
+ else
+ {
+ await this.ScenarioStartAsync();
+#line 7
+await this.FeatureBackgroundAsync();
+#line hidden
+ global::Reqnroll.Table table473 = new global::Reqnroll.Table(new string[] {
+ "PageNumber",
+ "PageSize",
+ "Sorting"});
+ table473.AddRow(new string[] {
+ "0",
+ "500",
+ "ProductCategoryId DESC"});
+#line 182
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table473, "When ");
+#line hidden
+ global::Reqnroll.Table table474 = new global::Reqnroll.Table(new string[] {
+ "Key",
+ "Value",
+ "TypeName"});
+ table474.AddRow(new string[] {
+ "pageingFilter",
+ "{{model}}",
+ "AdventureWorksDemo.Data.Paging.PagingFilter"});
+#line 185
+ await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table474, "And ");
+#line hidden
+ global::Reqnroll.Table table475 = new global::Reqnroll.Table(new string[] {
+ "Expected"});
+ table475.AddRow(new string[] {
+ "AdventureWorksDemo.Data.Paging.PagedList"});
+#line 188
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table475, "Then ");
+#line hidden
+ global::Reqnroll.Table table476 = new global::Reqnroll.Table(new string[] {
+ "TotalPages",
+ "TotalCount",
+ "PageSize",
+ "CurrentPage"});
+ table476.AddRow(new string[] {
+ "1",
+ "42",
+ "100",
+ "0"});
+#line 191
+ await testRunner.AndAsync("the PagedList values are", ((string)(null)), table476, "And ");
+#line hidden
+ global::Reqnroll.Table table477 = new global::Reqnroll.Table(new string[] {
+ "ProductCategoryId",
+ "ParentProductCategoryId",
+ "Name",
+ "ModifiedDate",
+ "Rowguid"});
+ table477.AddRow(new string[] {
+ "42",
+ "",
+ "Record to Delete",
+ "6/1/2005 12:00:00 AM",
+ "3c17c9ae-e906-48b4-bdd3-000000000001"});
+ table477.AddRow(new string[] {
+ "41",
+ "4",
+ "Tires and Tubes",
+ "6/1/2002 12:00:00 AM",
+ "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
+ table477.AddRow(new string[] {
+ "40",
+ "4",
+ "Pumps",
+ "6/1/2002 12:00:00 AM",
+ "fe4d46f2-c87c-48c5-a4a1-3f55712d80b1"});
+ table477.AddRow(new string[] {
+ "39",
+ "4",
+ "Panniers",
+ "6/1/2002 12:00:00 AM",
+ "3002a5d5-fec3-464b-bef3-e0f81d35f431"});
+ table477.AddRow(new string[] {
+ "38",
+ "4",
+ "Locks",
+ "6/1/2002 12:00:00 AM",
+ "19646983-3fa0-4773-9a0c-f34c49df9bc8"});
+ table477.AddRow(new string[] {
+ "37",
+ "4",
+ "Lights",
+ "6/1/2002 12:00:00 AM",
+ "954178ba-624f-42db-95f6-ca035f36d130"});
+ table477.AddRow(new string[] {
+ "36",
+ "4",
+ "Hydration Packs",
+ "6/1/2002 12:00:00 AM",
+ "646a8906-fc87-4267-a443-9c6d791e6693"});
+ table477.AddRow(new string[] {
+ "35",
+ "4",
+ "Helmets",
+ "6/1/2002 12:00:00 AM",
+ "f5e07a33-c9e0-439c-b5f3-9f25fb65becc"});
+ table477.AddRow(new string[] {
+ "34",
+ "4",
+ "Fenders",
+ "6/1/2002 12:00:00 AM",
+ "1697f8a2-0a08-4883-b7dd-d19117b4e9a7"});
+ table477.AddRow(new string[] {
+ "33",
+ "4",
+ "Cleaners",
+ "6/1/2002 12:00:00 AM",
+ "9ad3bcf0-244d-4ec4-a6a0-fb701351c6a3"});
+ table477.AddRow(new string[] {
+ "32",
+ "4",
+ "Bottles and Cages",
+ "6/1/2002 12:00:00 AM",
+ "9b7dff41-9fa3-4776-8def-2c9a48c8b779"});
+ table477.AddRow(new string[] {
+ "31",
+ "4",
+ "Bike Stands",
+ "6/1/2002 12:00:00 AM",
+ "43b445c8-b820-424e-a1d5-90d81da0b46f"});
+ table477.AddRow(new string[] {
+ "30",
+ "4",
+ "Bike Racks",
+ "6/1/2002 12:00:00 AM",
+ "4624b5ce-66d6-496b-9201-c053df3556cc"});
+ table477.AddRow(new string[] {
+ "29",
+ "3",
+ "Vests",
+ "6/1/2002 12:00:00 AM",
+ "9ad7fe93-5ba0-4736-b578-ff80a2071297"});
+ table477.AddRow(new string[] {
+ "28",
+ "3",
+ "Tights",
+ "6/1/2002 12:00:00 AM",
+ "5deb3e55-9897-4416-b18a-515e970bc2d1"});
+ table477.AddRow(new string[] {
+ "27",
+ "3",
+ "Socks",
+ "6/1/2002 12:00:00 AM",
+ "701019c3-09fe-4949-8386-c6ce686474e5"});
+ table477.AddRow(new string[] {
+ "26",
+ "3",
+ "Shorts",
+ "6/1/2002 12:00:00 AM",
+ "1a5ba5b3-03c3-457c-b11e-4fa85ede87da"});
+ table477.AddRow(new string[] {
+ "25",
+ "3",
+ "Jerseys",
+ "6/1/2002 12:00:00 AM",
+ "09e91437-ba4f-4b1a-8215-74184fd95db8"});
+ table477.AddRow(new string[] {
+ "24",
+ "3",
+ "Gloves",
+ "6/1/2002 12:00:00 AM",
+ "92d5657b-0032-4e49-bad5-41a441a70942"});
+ table477.AddRow(new string[] {
+ "23",
+ "3",
+ "Caps",
+ "6/1/2002 12:00:00 AM",
+ "430dd6a8-a755-4b23-bb05-52520107da5f"});
+ table477.AddRow(new string[] {
+ "22",
+ "3",
+ "Bib-Shorts",
+ "6/1/2002 12:00:00 AM",
+ "67b58d2b-5798-4a90-8c6c-5ddacf057171"});
+ table477.AddRow(new string[] {
+ "21",
+ "2",
+ "Wheels",
+ "6/1/2002 12:00:00 AM",
+ "43521287-4b0b-438e-b80e-d82d9ad7c9f0"});
+ table477.AddRow(new string[] {
+ "20",
+ "2",
+ "Touring Frames",
+ "6/1/2002 12:00:00 AM",
+ "d2e3f1a8-56c4-4f36-b29d-5659fc0d2789"});
+ table477.AddRow(new string[] {
+ "19",
+ "2",
+ "Saddles",
+ "6/1/2002 12:00:00 AM",
+ "049fffa3-9d30-46df-82f7-f20730ec02b3"});
+ table477.AddRow(new string[] {
+ "18",
+ "2",
+ "Road Frames",
+ "6/1/2002 12:00:00 AM",
+ "5515f857-075b-4f9a-87b7-43b4997077b3"});
+ table477.AddRow(new string[] {
+ "17",
+ "2",
+ "Pedals",
+ "6/1/2002 12:00:00 AM",
+ "6d24ac07-7a84-4849-864a-865a14125bc9"});
+ table477.AddRow(new string[] {
+ "16",
+ "2",
+ "Mountain Frames",
+ "6/1/2002 12:00:00 AM",
+ "61b21b65-e16a-4be7-9300-4d8e9db861be"});
+ table477.AddRow(new string[] {
+ "15",
+ "2",
+ "Headsets",
+ "6/1/2002 12:00:00 AM",
+ "7c782bbe-5a16-495a-aa50-10afe5a84af2"});
+ table477.AddRow(new string[] {
+ "14",
+ "2",
+ "Forks",
+ "6/1/2002 12:00:00 AM",
+ "b5f9ba42-b69b-4fdd-b2ec-57fb7b42e3cf"});
+ table477.AddRow(new string[] {
+ "13",
+ "2",
+ "Derailleurs",
+ "6/1/2002 12:00:00 AM",
+ "1830d70c-aa2a-40c0-a271-5ba86f38f8bf"});
+ table477.AddRow(new string[] {
+ "12",
+ "2",
+ "Cranksets",
+ "6/1/2002 12:00:00 AM",
+ "4f644521-422b-4f19-974a-e3df6102567e"});
+ table477.AddRow(new string[] {
+ "11",
+ "2",
+ "Chains",
+ "6/1/2002 12:00:00 AM",
+ "e93a7231-f16c-4b0f-8c41-c73fdec62da0"});
+ table477.AddRow(new string[] {
+ "10",
+ "2",
+ "Brakes",
"6/1/2002 12:00:00 AM",
- "Bikes",
- "",
- "1",
- "cfbda25c-df71-47a7-b81b-64ee161aa37c"});
- table367.AddRow(new string[] {
+ "d43ba4a3-ef0d-426b-90eb-4be4547dd30c"});
+ table477.AddRow(new string[] {
+ "9",
+ "2",
+ "Bottom Brackets",
"6/1/2002 12:00:00 AM",
- "Components",
- "",
+ "a9e54089-8a1e-4cf5-8646-e3801f685934"});
+ table477.AddRow(new string[] {
+ "8",
"2",
- "c657828d-d808-4aba-91a3-af2ce02300e9"});
- table367.AddRow(new string[] {
+ "Handlebars",
"6/1/2002 12:00:00 AM",
- "Clothing",
+ "3ef2c725-7135-4c85-9ae6-ae9a3bdd9283"});
+ table477.AddRow(new string[] {
+ "7",
+ "1",
+ "Touring Bikes",
+ "6/1/2002 12:00:00 AM",
+ "02c5061d-ecdc-4274-b5f1-e91d76bc3f37"});
+ table477.AddRow(new string[] {
+ "6",
+ "1",
+ "Road Bikes",
+ "6/1/2002 12:00:00 AM",
+ "000310c0-bcc8-42c4-b0c3-45ae611af06b"});
+ table477.AddRow(new string[] {
+ "5",
+ "1",
+ "Mountain Bikes",
+ "6/1/2002 12:00:00 AM",
+ "2d364ade-264a-433c-b092-4fcbf3804e01"});
+ table477.AddRow(new string[] {
+ "4",
"",
+ "Accessories",
+ "6/1/2002 12:00:00 AM",
+ "2be3be36-d9a2-4eee-b593-ed895d97c2a6"});
+ table477.AddRow(new string[] {
"3",
+ "",
+ "Clothing",
+ "6/1/2002 12:00:00 AM",
"10a7c342-ca82-48d4-8a38-46a2eb089b74"});
- table367.AddRow(new string[] {
+ table477.AddRow(new string[] {
+ "2",
+ "",
+ "Components",
"6/1/2002 12:00:00 AM",
- "Mountain Bikes",
+ "c657828d-d808-4aba-91a3-af2ce02300e9"});
+ table477.AddRow(new string[] {
"1",
- "5",
- "2d364ade-264a-433c-b092-4fcbf3804e01"});
-#line 55
- await testRunner.AndAsync("the results are", ((string)(null)), table367, "And ");
+ "",
+ "Bikes",
+ "6/1/2002 12:00:00 AM",
+ "cfbda25c-df71-47a7-b81b-64ee161aa37c"});
+#line 194
+ await testRunner.AndAsync("the sorted results are", ((string)(null)), table477, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
}
[Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()]
- [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("FindAllAsync_1_500")]
+ [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("FindAllAsync_0_500_Sort_ProductCategoryIdASC")]
[Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ProductCategoryServiceFindTests")]
- public async System.Threading.Tasks.Task FindAllAsync_1_500()
+ public async System.Threading.Tasks.Task FindAllAsync_0_500_Sort_ProductCategoryIdASC()
{
string[] tagsOfScenario = ((string[])(null));
System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
- global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("FindAllAsync_1_500", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 63
+ global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("FindAllAsync_0_500_Sort_ProductCategoryIdASC", null, tagsOfScenario, argumentsOfScenario, featureTags);
+#line 240
this.ScenarioInitialize(scenarioInfo);
#line hidden
if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags)))
@@ -393,307 +1378,309 @@ public async System.Threading.Tasks.Task FindAllAsync_1_500()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table368 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table478 = new global::Reqnroll.Table(new string[] {
"PageNumber",
- "PageSize"});
- table368.AddRow(new string[] {
- "1",
- "500"});
-#line 64
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table368, "When ");
+ "PageSize",
+ "Sorting"});
+ table478.AddRow(new string[] {
+ "0",
+ "500",
+ "ProductCategoryId ASC"});
+#line 241
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table478, "When ");
#line hidden
- global::Reqnroll.Table table369 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table479 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table369.AddRow(new string[] {
+ table479.AddRow(new string[] {
"pageingFilter",
"{{model}}",
"AdventureWorksDemo.Data.Paging.PagingFilter"});
-#line 67
- await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table369, "And ");
+#line 244
+ await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table479, "And ");
#line hidden
- global::Reqnroll.Table table370 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table480 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table370.AddRow(new string[] {
+ table480.AddRow(new string[] {
"AdventureWorksDemo.Data.Paging.PagedList"});
-#line 70
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table370, "Then ");
+#line 247
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table480, "Then ");
#line hidden
- global::Reqnroll.Table table371 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table481 = new global::Reqnroll.Table(new string[] {
"TotalPages",
"TotalCount",
"PageSize",
"CurrentPage"});
- table371.AddRow(new string[] {
+ table481.AddRow(new string[] {
"1",
"42",
"100",
- "1"});
-#line 73
- await testRunner.AndAsync("the PagedList values are", ((string)(null)), table371, "And ");
+ "0"});
+#line 250
+ await testRunner.AndAsync("the PagedList values are", ((string)(null)), table481, "And ");
#line hidden
- global::Reqnroll.Table table372 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table482 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"1",
"",
"Bikes",
"6/1/2002 12:00:00 AM",
"cfbda25c-df71-47a7-b81b-64ee161aa37c"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"2",
"",
"Components",
"6/1/2002 12:00:00 AM",
"c657828d-d808-4aba-91a3-af2ce02300e9"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"3",
"",
"Clothing",
"6/1/2002 12:00:00 AM",
"10a7c342-ca82-48d4-8a38-46a2eb089b74"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"4",
"",
"Accessories",
"6/1/2002 12:00:00 AM",
"2be3be36-d9a2-4eee-b593-ed895d97c2a6"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"5",
"1",
"Mountain Bikes",
"6/1/2002 12:00:00 AM",
"2d364ade-264a-433c-b092-4fcbf3804e01"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"6",
"1",
"Road Bikes",
"6/1/2002 12:00:00 AM",
"000310c0-bcc8-42c4-b0c3-45ae611af06b"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"7",
"1",
"Touring Bikes",
"6/1/2002 12:00:00 AM",
"02c5061d-ecdc-4274-b5f1-e91d76bc3f37"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"8",
"2",
"Handlebars",
"6/1/2002 12:00:00 AM",
"3ef2c725-7135-4c85-9ae6-ae9a3bdd9283"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"9",
"2",
"Bottom Brackets",
"6/1/2002 12:00:00 AM",
"a9e54089-8a1e-4cf5-8646-e3801f685934"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"10",
"2",
"Brakes",
"6/1/2002 12:00:00 AM",
"d43ba4a3-ef0d-426b-90eb-4be4547dd30c"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"11",
"2",
"Chains",
"6/1/2002 12:00:00 AM",
"e93a7231-f16c-4b0f-8c41-c73fdec62da0"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"12",
"2",
"Cranksets",
"6/1/2002 12:00:00 AM",
"4f644521-422b-4f19-974a-e3df6102567e"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"13",
"2",
"Derailleurs",
"6/1/2002 12:00:00 AM",
"1830d70c-aa2a-40c0-a271-5ba86f38f8bf"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"14",
"2",
"Forks",
"6/1/2002 12:00:00 AM",
"b5f9ba42-b69b-4fdd-b2ec-57fb7b42e3cf"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"15",
"2",
"Headsets",
"6/1/2002 12:00:00 AM",
"7c782bbe-5a16-495a-aa50-10afe5a84af2"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"16",
"2",
"Mountain Frames",
"6/1/2002 12:00:00 AM",
"61b21b65-e16a-4be7-9300-4d8e9db861be"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"17",
"2",
"Pedals",
"6/1/2002 12:00:00 AM",
"6d24ac07-7a84-4849-864a-865a14125bc9"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"18",
"2",
"Road Frames",
"6/1/2002 12:00:00 AM",
"5515f857-075b-4f9a-87b7-43b4997077b3"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"19",
"2",
"Saddles",
"6/1/2002 12:00:00 AM",
"049fffa3-9d30-46df-82f7-f20730ec02b3"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"20",
"2",
"Touring Frames",
"6/1/2002 12:00:00 AM",
"d2e3f1a8-56c4-4f36-b29d-5659fc0d2789"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"21",
"2",
"Wheels",
"6/1/2002 12:00:00 AM",
"43521287-4b0b-438e-b80e-d82d9ad7c9f0"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"22",
"3",
"Bib-Shorts",
"6/1/2002 12:00:00 AM",
"67b58d2b-5798-4a90-8c6c-5ddacf057171"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"23",
"3",
"Caps",
"6/1/2002 12:00:00 AM",
"430dd6a8-a755-4b23-bb05-52520107da5f"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"24",
"3",
"Gloves",
"6/1/2002 12:00:00 AM",
"92d5657b-0032-4e49-bad5-41a441a70942"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"25",
"3",
"Jerseys",
"6/1/2002 12:00:00 AM",
"09e91437-ba4f-4b1a-8215-74184fd95db8"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"26",
"3",
"Shorts",
"6/1/2002 12:00:00 AM",
"1a5ba5b3-03c3-457c-b11e-4fa85ede87da"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"27",
"3",
"Socks",
"6/1/2002 12:00:00 AM",
"701019c3-09fe-4949-8386-c6ce686474e5"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"28",
"3",
"Tights",
"6/1/2002 12:00:00 AM",
"5deb3e55-9897-4416-b18a-515e970bc2d1"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"29",
"3",
"Vests",
"6/1/2002 12:00:00 AM",
"9ad7fe93-5ba0-4736-b578-ff80a2071297"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"30",
"4",
"Bike Racks",
"6/1/2002 12:00:00 AM",
"4624b5ce-66d6-496b-9201-c053df3556cc"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"31",
"4",
"Bike Stands",
"6/1/2002 12:00:00 AM",
"43b445c8-b820-424e-a1d5-90d81da0b46f"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"32",
"4",
"Bottles and Cages",
"6/1/2002 12:00:00 AM",
"9b7dff41-9fa3-4776-8def-2c9a48c8b779"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"33",
"4",
"Cleaners",
"6/1/2002 12:00:00 AM",
"9ad3bcf0-244d-4ec4-a6a0-fb701351c6a3"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"34",
"4",
"Fenders",
"6/1/2002 12:00:00 AM",
"1697f8a2-0a08-4883-b7dd-d19117b4e9a7"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"35",
"4",
"Helmets",
"6/1/2002 12:00:00 AM",
"f5e07a33-c9e0-439c-b5f3-9f25fb65becc"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"36",
"4",
"Hydration Packs",
"6/1/2002 12:00:00 AM",
"646a8906-fc87-4267-a443-9c6d791e6693"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"37",
"4",
"Lights",
"6/1/2002 12:00:00 AM",
"954178ba-624f-42db-95f6-ca035f36d130"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"38",
"4",
"Locks",
"6/1/2002 12:00:00 AM",
"19646983-3fa0-4773-9a0c-f34c49df9bc8"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"39",
"4",
"Panniers",
"6/1/2002 12:00:00 AM",
"3002a5d5-fec3-464b-bef3-e0f81d35f431"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"40",
"4",
"Pumps",
"6/1/2002 12:00:00 AM",
"fe4d46f2-c87c-48c5-a4a1-3f55712d80b1"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table372.AddRow(new string[] {
+ table482.AddRow(new string[] {
"42",
"",
"Record to Delete",
"6/1/2005 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-000000000001"});
-#line 76
- await testRunner.AndAsync("the results are", ((string)(null)), table372, "And ");
+#line 253
+ await testRunner.AndAsync("the sorted results are", ((string)(null)), table482, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -707,7 +1694,7 @@ public async System.Threading.Tasks.Task FindAllAsync_2_5()
string[] tagsOfScenario = ((string[])(null));
System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("FindAllAsync_2_5", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 120
+#line 297
this.ScenarioInitialize(scenarioInfo);
#line hidden
if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags)))
@@ -720,85 +1707,85 @@ public async System.Threading.Tasks.Task FindAllAsync_2_5()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table373 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table483 = new global::Reqnroll.Table(new string[] {
"PageNumber",
"PageSize"});
- table373.AddRow(new string[] {
+ table483.AddRow(new string[] {
"2",
"5"});
-#line 121
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table373, "When ");
+#line 298
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table483, "When ");
#line hidden
- global::Reqnroll.Table table374 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table484 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table374.AddRow(new string[] {
+ table484.AddRow(new string[] {
"pageingFilter",
"{{model}}",
"AdventureWorksDemo.Data.Paging.PagingFilter"});
-#line 124
- await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table374, "And ");
+#line 301
+ await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table484, "And ");
#line hidden
- global::Reqnroll.Table table375 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table485 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table375.AddRow(new string[] {
+ table485.AddRow(new string[] {
"AdventureWorksDemo.Data.Paging.PagedList"});
-#line 127
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table375, "Then ");
+#line 304
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table485, "Then ");
#line hidden
- global::Reqnroll.Table table376 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table486 = new global::Reqnroll.Table(new string[] {
"TotalPages",
"TotalCount",
"PageSize",
"CurrentPage"});
- table376.AddRow(new string[] {
+ table486.AddRow(new string[] {
"9",
"42",
"5",
"2"});
-#line 130
- await testRunner.AndAsync("the PagedList values are", ((string)(null)), table376, "And ");
+#line 307
+ await testRunner.AndAsync("the PagedList values are", ((string)(null)), table486, "And ");
#line hidden
- global::Reqnroll.Table table377 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table487 = new global::Reqnroll.Table(new string[] {
"ModifiedDate",
"Name",
"ParentProductCategoryId",
"ProductCategoryId",
"Rowguid"});
- table377.AddRow(new string[] {
+ table487.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
- "Road Bikes",
- "1",
- "6",
- "000310c0-bcc8-42c4-b0c3-45ae611af06b"});
- table377.AddRow(new string[] {
+ "Chains",
+ "2",
+ "11",
+ "e93a7231-f16c-4b0f-8c41-c73fdec62da0"});
+ table487.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
- "Touring Bikes",
- "1",
- "7",
- "02c5061d-ecdc-4274-b5f1-e91d76bc3f37"});
- table377.AddRow(new string[] {
+ "Cranksets",
+ "2",
+ "12",
+ "4f644521-422b-4f19-974a-e3df6102567e"});
+ table487.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
- "Handlebars",
+ "Derailleurs",
"2",
- "8",
- "3ef2c725-7135-4c85-9ae6-ae9a3bdd9283"});
- table377.AddRow(new string[] {
+ "13",
+ "1830d70c-aa2a-40c0-a271-5ba86f38f8bf"});
+ table487.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
- "Bottom Brackets",
+ "Forks",
"2",
- "9",
- "a9e54089-8a1e-4cf5-8646-e3801f685934"});
- table377.AddRow(new string[] {
+ "14",
+ "b5f9ba42-b69b-4fdd-b2ec-57fb7b42e3cf"});
+ table487.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
- "Brakes",
+ "Headsets",
"2",
- "10",
- "d43ba4a3-ef0d-426b-90eb-4be4547dd30c"});
-#line 133
- await testRunner.AndAsync("the results are", ((string)(null)), table377, "And ");
+ "15",
+ "7c782bbe-5a16-495a-aa50-10afe5a84af2"});
+#line 310
+ await testRunner.AndAsync("the sorted results are", ((string)(null)), table487, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -812,7 +1799,7 @@ public async System.Threading.Tasks.Task FindAllAsync_2_8()
string[] tagsOfScenario = ((string[])(null));
System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("FindAllAsync_2_8", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 141
+#line 318
this.ScenarioInitialize(scenarioInfo);
#line hidden
if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags)))
@@ -825,103 +1812,103 @@ public async System.Threading.Tasks.Task FindAllAsync_2_8()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table378 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table488 = new global::Reqnroll.Table(new string[] {
"PageNumber",
"PageSize"});
- table378.AddRow(new string[] {
+ table488.AddRow(new string[] {
"2",
"8"});
-#line 142
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table378, "When ");
+#line 319
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table488, "When ");
#line hidden
- global::Reqnroll.Table table379 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table489 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table379.AddRow(new string[] {
+ table489.AddRow(new string[] {
"pageingFilter",
"{{model}}",
"AdventureWorksDemo.Data.Paging.PagingFilter"});
-#line 145
- await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table379, "And ");
+#line 322
+ await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table489, "And ");
#line hidden
- global::Reqnroll.Table table380 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table490 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table380.AddRow(new string[] {
+ table490.AddRow(new string[] {
"AdventureWorksDemo.Data.Paging.PagedList"});
-#line 148
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table380, "Then ");
+#line 325
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table490, "Then ");
#line hidden
- global::Reqnroll.Table table381 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table491 = new global::Reqnroll.Table(new string[] {
"TotalPages",
"TotalCount",
"PageSize",
"CurrentPage"});
- table381.AddRow(new string[] {
+ table491.AddRow(new string[] {
"6",
"42",
"8",
"2"});
-#line 151
- await testRunner.AndAsync("the PagedList values are", ((string)(null)), table381, "And ");
+#line 328
+ await testRunner.AndAsync("the PagedList values are", ((string)(null)), table491, "And ");
#line hidden
- global::Reqnroll.Table table382 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table492 = new global::Reqnroll.Table(new string[] {
"ModifiedDate",
"Name",
"ParentProductCategoryId",
"ProductCategoryId",
"Rowguid"});
- table382.AddRow(new string[] {
+ table492.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
- "Bottom Brackets",
+ "Pedals",
"2",
- "9",
- "a9e54089-8a1e-4cf5-8646-e3801f685934"});
- table382.AddRow(new string[] {
+ "17",
+ "6d24ac07-7a84-4849-864a-865a14125bc9"});
+ table492.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
- "Brakes",
+ "Road Frames",
"2",
- "10",
- "d43ba4a3-ef0d-426b-90eb-4be4547dd30c"});
- table382.AddRow(new string[] {
+ "18",
+ "5515f857-075b-4f9a-87b7-43b4997077b3"});
+ table492.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
- "Chains",
+ "Saddles",
"2",
- "11",
- "e93a7231-f16c-4b0f-8c41-c73fdec62da0"});
- table382.AddRow(new string[] {
+ "19",
+ "049fffa3-9d30-46df-82f7-f20730ec02b3"});
+ table492.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
- "Cranksets",
+ "Touring Frames",
"2",
- "12",
- "4f644521-422b-4f19-974a-e3df6102567e"});
- table382.AddRow(new string[] {
+ "20",
+ "d2e3f1a8-56c4-4f36-b29d-5659fc0d2789"});
+ table492.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
- "Derailleurs",
+ "Wheels",
"2",
- "13",
- "1830d70c-aa2a-40c0-a271-5ba86f38f8bf"});
- table382.AddRow(new string[] {
+ "21",
+ "43521287-4b0b-438e-b80e-d82d9ad7c9f0"});
+ table492.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
- "Forks",
- "2",
- "14",
- "b5f9ba42-b69b-4fdd-b2ec-57fb7b42e3cf"});
- table382.AddRow(new string[] {
+ "Bib-Shorts",
+ "3",
+ "22",
+ "67b58d2b-5798-4a90-8c6c-5ddacf057171"});
+ table492.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
- "Headsets",
- "2",
- "15",
- "7c782bbe-5a16-495a-aa50-10afe5a84af2"});
- table382.AddRow(new string[] {
+ "Caps",
+ "3",
+ "23",
+ "430dd6a8-a755-4b23-bb05-52520107da5f"});
+ table492.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
- "Mountain Frames",
- "2",
- "16",
- "61b21b65-e16a-4be7-9300-4d8e9db861be"});
-#line 154
- await testRunner.AndAsync("the results are", ((string)(null)), table382, "And ");
+ "Gloves",
+ "3",
+ "24",
+ "92d5657b-0032-4e49-bad5-41a441a70942"});
+#line 331
+ await testRunner.AndAsync("the sorted results are", ((string)(null)), table492, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -935,7 +1922,7 @@ public async System.Threading.Tasks.Task FindAllAsync_1234_5()
string[] tagsOfScenario = ((string[])(null));
System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("FindAllAsync_1234_5", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 165
+#line 342
this.ScenarioInitialize(scenarioInfo);
#line hidden
if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags)))
@@ -948,55 +1935,67 @@ public async System.Threading.Tasks.Task FindAllAsync_1234_5()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table383 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table493 = new global::Reqnroll.Table(new string[] {
"PageNumber",
"PageSize"});
- table383.AddRow(new string[] {
+ table493.AddRow(new string[] {
"1234",
"5"});
-#line 166
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table383, "When ");
+#line 343
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table493, "When ");
#line hidden
- global::Reqnroll.Table table384 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table494 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table384.AddRow(new string[] {
+ table494.AddRow(new string[] {
"pageingFilter",
"{{model}}",
"AdventureWorksDemo.Data.Paging.PagingFilter"});
-#line 169
- await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table384, "And ");
+#line 346
+ await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table494, "And ");
#line hidden
- global::Reqnroll.Table table385 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table495 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table385.AddRow(new string[] {
+ table495.AddRow(new string[] {
"AdventureWorksDemo.Data.Paging.PagedList"});
-#line 172
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table385, "Then ");
+#line 349
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table495, "Then ");
#line hidden
- global::Reqnroll.Table table386 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table496 = new global::Reqnroll.Table(new string[] {
"TotalPages",
"TotalCount",
"PageSize",
"CurrentPage"});
- table386.AddRow(new string[] {
+ table496.AddRow(new string[] {
"9",
"42",
"5",
- "1234"});
-#line 175
- await testRunner.AndAsync("the PagedList values are", ((string)(null)), table386, "And ");
+ "8"});
+#line 352
+ await testRunner.AndAsync("the PagedList values are", ((string)(null)), table496, "And ");
#line hidden
- global::Reqnroll.Table table387 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table497 = new global::Reqnroll.Table(new string[] {
"ModifiedDate",
"Name",
"ParentProductCategoryId",
"ProductCategoryId",
"Rowguid"});
-#line 178
- await testRunner.AndAsync("the results are", ((string)(null)), table387, "And ");
+ table497.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Tires and Tubes",
+ "4",
+ "41",
+ "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
+ table497.AddRow(new string[] {
+ "6/1/2005 12:00:00 AM",
+ "Record to Delete",
+ "",
+ "42",
+ "3c17c9ae-e906-48b4-bdd3-000000000001"});
+#line 355
+ await testRunner.AndAsync("the sorted results are", ((string)(null)), table497, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -1010,7 +2009,7 @@ public async System.Threading.Tasks.Task FindAllAsync_0_5()
string[] tagsOfScenario = ((string[])(null));
System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("FindAllAsync_0_5", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 181
+#line 360
this.ScenarioInitialize(scenarioInfo);
#line hidden
if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags)))
@@ -1023,85 +2022,85 @@ public async System.Threading.Tasks.Task FindAllAsync_0_5()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table388 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table498 = new global::Reqnroll.Table(new string[] {
"PageNumber",
"PageSize"});
- table388.AddRow(new string[] {
+ table498.AddRow(new string[] {
"0",
"5"});
-#line 182
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table388, "When ");
+#line 361
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table498, "When ");
#line hidden
- global::Reqnroll.Table table389 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table499 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table389.AddRow(new string[] {
+ table499.AddRow(new string[] {
"pageingFilter",
"{{model}}",
"AdventureWorksDemo.Data.Paging.PagingFilter"});
-#line 185
- await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table389, "And ");
+#line 364
+ await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table499, "And ");
#line hidden
- global::Reqnroll.Table table390 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table500 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table390.AddRow(new string[] {
+ table500.AddRow(new string[] {
"AdventureWorksDemo.Data.Paging.PagedList"});
-#line 188
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table390, "Then ");
+#line 367
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table500, "Then ");
#line hidden
- global::Reqnroll.Table table391 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table501 = new global::Reqnroll.Table(new string[] {
"TotalPages",
"TotalCount",
"PageSize",
"CurrentPage"});
- table391.AddRow(new string[] {
+ table501.AddRow(new string[] {
"9",
"42",
"5",
- "1"});
-#line 192
- await testRunner.AndAsync("the PagedList values are", ((string)(null)), table391, "And ");
+ "0"});
+#line 371
+ await testRunner.AndAsync("the PagedList values are", ((string)(null)), table501, "And ");
#line hidden
- global::Reqnroll.Table table392 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table502 = new global::Reqnroll.Table(new string[] {
"ModifiedDate",
"Name",
"ParentProductCategoryId",
"ProductCategoryId",
"Rowguid"});
- table392.AddRow(new string[] {
+ table502.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Bikes",
"",
"1",
"cfbda25c-df71-47a7-b81b-64ee161aa37c"});
- table392.AddRow(new string[] {
+ table502.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Components",
"",
"2",
"c657828d-d808-4aba-91a3-af2ce02300e9"});
- table392.AddRow(new string[] {
+ table502.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Clothing",
"",
"3",
"10a7c342-ca82-48d4-8a38-46a2eb089b74"});
- table392.AddRow(new string[] {
+ table502.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Accessories",
"",
"4",
"2be3be36-d9a2-4eee-b593-ed895d97c2a6"});
- table392.AddRow(new string[] {
+ table502.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Mountain Bikes",
"1",
"5",
"2d364ade-264a-433c-b092-4fcbf3804e01"});
-#line 195
- await testRunner.AndAsync("the results are", ((string)(null)), table392, "And ");
+#line 374
+ await testRunner.AndAsync("the sorted results are", ((string)(null)), table502, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -1115,7 +2114,7 @@ public async System.Threading.Tasks.Task FindAllAsync_0_0()
string[] tagsOfScenario = ((string[])(null));
System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("FindAllAsync_0_0", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 203
+#line 382
this.ScenarioInitialize(scenarioInfo);
#line hidden
if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags)))
@@ -1128,205 +2127,205 @@ public async System.Threading.Tasks.Task FindAllAsync_0_0()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table393 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table503 = new global::Reqnroll.Table(new string[] {
"PageNumber",
"PageSize"});
- table393.AddRow(new string[] {
+ table503.AddRow(new string[] {
"0",
"0"});
-#line 204
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table393, "When ");
+#line 383
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table503, "When ");
#line hidden
- global::Reqnroll.Table table394 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table504 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table394.AddRow(new string[] {
+ table504.AddRow(new string[] {
"pageingFilter",
"{{model}}",
"AdventureWorksDemo.Data.Paging.PagingFilter"});
-#line 207
- await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table394, "And ");
+#line 386
+ await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table504, "And ");
#line hidden
- global::Reqnroll.Table table395 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table505 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table395.AddRow(new string[] {
+ table505.AddRow(new string[] {
"AdventureWorksDemo.Data.Paging.PagedList"});
-#line 210
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table395, "Then ");
+#line 389
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table505, "Then ");
#line hidden
- global::Reqnroll.Table table396 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table506 = new global::Reqnroll.Table(new string[] {
"TotalPages",
"TotalCount",
"PageSize",
"CurrentPage"});
- table396.AddRow(new string[] {
+ table506.AddRow(new string[] {
"2",
"42",
"25",
- "1"});
-#line 214
- await testRunner.AndAsync("the PagedList values are", ((string)(null)), table396, "And ");
+ "0"});
+#line 393
+ await testRunner.AndAsync("the PagedList values are", ((string)(null)), table506, "And ");
#line hidden
- global::Reqnroll.Table table397 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table507 = new global::Reqnroll.Table(new string[] {
"ModifiedDate",
"Name",
"ParentProductCategoryId",
"ProductCategoryId",
"Rowguid"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Bikes",
"",
"1",
"cfbda25c-df71-47a7-b81b-64ee161aa37c"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Components",
"",
"2",
"c657828d-d808-4aba-91a3-af2ce02300e9"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Clothing",
"",
"3",
"10a7c342-ca82-48d4-8a38-46a2eb089b74"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Accessories",
"",
"4",
"2be3be36-d9a2-4eee-b593-ed895d97c2a6"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Mountain Bikes",
"1",
"5",
"2d364ade-264a-433c-b092-4fcbf3804e01"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Road Bikes",
"1",
"6",
"000310c0-bcc8-42c4-b0c3-45ae611af06b"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Touring Bikes",
"1",
"7",
"02c5061d-ecdc-4274-b5f1-e91d76bc3f37"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Handlebars",
"2",
"8",
"3ef2c725-7135-4c85-9ae6-ae9a3bdd9283"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Bottom Brackets",
"2",
"9",
"a9e54089-8a1e-4cf5-8646-e3801f685934"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Brakes",
"2",
"10",
"d43ba4a3-ef0d-426b-90eb-4be4547dd30c"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Chains",
"2",
"11",
"e93a7231-f16c-4b0f-8c41-c73fdec62da0"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Cranksets",
"2",
"12",
"4f644521-422b-4f19-974a-e3df6102567e"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Derailleurs",
"2",
"13",
"1830d70c-aa2a-40c0-a271-5ba86f38f8bf"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Forks",
"2",
"14",
"b5f9ba42-b69b-4fdd-b2ec-57fb7b42e3cf"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Headsets",
"2",
"15",
"7c782bbe-5a16-495a-aa50-10afe5a84af2"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Mountain Frames",
"2",
"16",
"61b21b65-e16a-4be7-9300-4d8e9db861be"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Pedals",
"2",
"17",
"6d24ac07-7a84-4849-864a-865a14125bc9"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Road Frames",
"2",
"18",
"5515f857-075b-4f9a-87b7-43b4997077b3"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Saddles",
"2",
"19",
"049fffa3-9d30-46df-82f7-f20730ec02b3"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Touring Frames",
"2",
"20",
"d2e3f1a8-56c4-4f36-b29d-5659fc0d2789"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Wheels",
"2",
"21",
"43521287-4b0b-438e-b80e-d82d9ad7c9f0"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Bib-Shorts",
"3",
"22",
"67b58d2b-5798-4a90-8c6c-5ddacf057171"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Caps",
"3",
"23",
"430dd6a8-a755-4b23-bb05-52520107da5f"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Gloves",
"3",
"24",
"92d5657b-0032-4e49-bad5-41a441a70942"});
- table397.AddRow(new string[] {
+ table507.AddRow(new string[] {
"6/1/2002 12:00:00 AM",
"Jerseys",
"3",
"25",
"09e91437-ba4f-4b1a-8215-74184fd95db8"});
-#line 217
- await testRunner.AndAsync("the results are", ((string)(null)), table397, "And ");
+#line 396
+ await testRunner.AndAsync("the sorted results are", ((string)(null)), table507, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -1340,7 +2339,7 @@ public async System.Threading.Tasks.Task FindAllAsync_5_0()
string[] tagsOfScenario = ((string[])(null));
System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
global::Reqnroll.ScenarioInfo scenarioInfo = new global::Reqnroll.ScenarioInfo("FindAllAsync_5_0", null, tagsOfScenario, argumentsOfScenario, featureTags);
-#line 245
+#line 424
this.ScenarioInitialize(scenarioInfo);
#line hidden
if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags)))
@@ -1353,55 +2352,157 @@ public async System.Threading.Tasks.Task FindAllAsync_5_0()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table398 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table508 = new global::Reqnroll.Table(new string[] {
"PageNumber",
"PageSize"});
- table398.AddRow(new string[] {
+ table508.AddRow(new string[] {
"5",
"0"});
-#line 246
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table398, "When ");
+#line 425
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table508, "When ");
#line hidden
- global::Reqnroll.Table table399 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table509 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table399.AddRow(new string[] {
+ table509.AddRow(new string[] {
"pageingFilter",
"{{model}}",
"AdventureWorksDemo.Data.Paging.PagingFilter"});
-#line 249
- await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table399, "And ");
+#line 428
+ await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table509, "And ");
#line hidden
- global::Reqnroll.Table table400 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table510 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table400.AddRow(new string[] {
+ table510.AddRow(new string[] {
"AdventureWorksDemo.Data.Paging.PagedList"});
-#line 252
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table400, "Then ");
+#line 431
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table510, "Then ");
#line hidden
- global::Reqnroll.Table table401 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table511 = new global::Reqnroll.Table(new string[] {
"TotalPages",
"TotalCount",
"PageSize",
"CurrentPage"});
- table401.AddRow(new string[] {
+ table511.AddRow(new string[] {
"2",
"42",
"25",
- "5"});
-#line 256
- await testRunner.AndAsync("the PagedList values are", ((string)(null)), table401, "And ");
+ "1"});
+#line 435
+ await testRunner.AndAsync("the PagedList values are", ((string)(null)), table511, "And ");
#line hidden
- global::Reqnroll.Table table402 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table512 = new global::Reqnroll.Table(new string[] {
"ModifiedDate",
"Name",
"ParentProductCategoryId",
"ProductCategoryId",
"Rowguid"});
-#line 259
- await testRunner.AndAsync("the results are", ((string)(null)), table402, "And ");
+ table512.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Shorts",
+ "3",
+ "26",
+ "1a5ba5b3-03c3-457c-b11e-4fa85ede87da"});
+ table512.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Socks",
+ "3",
+ "27",
+ "701019c3-09fe-4949-8386-c6ce686474e5"});
+ table512.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Tights",
+ "3",
+ "28",
+ "5deb3e55-9897-4416-b18a-515e970bc2d1"});
+ table512.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Vests",
+ "3",
+ "29",
+ "9ad7fe93-5ba0-4736-b578-ff80a2071297"});
+ table512.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Bike Racks",
+ "4",
+ "30",
+ "4624b5ce-66d6-496b-9201-c053df3556cc"});
+ table512.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Bike Stands",
+ "4",
+ "31",
+ "43b445c8-b820-424e-a1d5-90d81da0b46f"});
+ table512.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Bottles and Cages",
+ "4",
+ "32",
+ "9b7dff41-9fa3-4776-8def-2c9a48c8b779"});
+ table512.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Cleaners",
+ "4",
+ "33",
+ "9ad3bcf0-244d-4ec4-a6a0-fb701351c6a3"});
+ table512.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Fenders",
+ "4",
+ "34",
+ "1697f8a2-0a08-4883-b7dd-d19117b4e9a7"});
+ table512.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Helmets",
+ "4",
+ "35",
+ "f5e07a33-c9e0-439c-b5f3-9f25fb65becc"});
+ table512.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Hydration Packs",
+ "4",
+ "36",
+ "646a8906-fc87-4267-a443-9c6d791e6693"});
+ table512.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Lights",
+ "4",
+ "37",
+ "954178ba-624f-42db-95f6-ca035f36d130"});
+ table512.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Locks",
+ "4",
+ "38",
+ "19646983-3fa0-4773-9a0c-f34c49df9bc8"});
+ table512.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Panniers",
+ "4",
+ "39",
+ "3002a5d5-fec3-464b-bef3-e0f81d35f431"});
+ table512.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Pumps",
+ "4",
+ "40",
+ "fe4d46f2-c87c-48c5-a4a1-3f55712d80b1"});
+ table512.AddRow(new string[] {
+ "6/1/2002 12:00:00 AM",
+ "Tires and Tubes",
+ "4",
+ "41",
+ "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
+ table512.AddRow(new string[] {
+ "6/1/2005 12:00:00 AM",
+ "Record to Delete",
+ "",
+ "42",
+ "3c17c9ae-e906-48b4-bdd3-000000000001"});
+#line 438
+ await testRunner.AndAsync("the sorted results are", ((string)(null)), table512, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
diff --git a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceUpdateTests.feature.cs b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceUpdateTests.feature.cs
index 8b17258..1d20c6e 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceUpdateTests.feature.cs
+++ b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProductCategoryService/ProductCategoryServiceUpdateTests.feature.cs
@@ -128,19 +128,19 @@ public async System.Threading.Tasks.Task Update01()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table416 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table526 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table416.AddRow(new string[] {
+ table526.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table416.AddRow(new string[] {
+ table526.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -148,77 +148,77 @@ public async System.Threading.Tasks.Task Update01()
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 12
await testRunner.GivenAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table416, "Given ");
+ "", ((string)(null)), table526, "Given ");
#line hidden
- global::Reqnroll.Table table417 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table527 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"Name",
"ParentProductCategoryId"});
- table417.AddRow(new string[] {
+ table527.AddRow(new string[] {
"41",
"Ping Pong",
""});
#line 16
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table417, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table527, "When ");
#line hidden
- global::Reqnroll.Table table418 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table528 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table418.AddRow(new string[] {
+ table528.AddRow(new string[] {
"model",
"{{model}}",
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 19
- await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table418, "And ");
+ await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table528, "And ");
#line hidden
- global::Reqnroll.Table table419 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table529 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table419.AddRow(new string[] {
+ table529.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 22
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table419, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table529, "Then ");
#line hidden
- global::Reqnroll.Table table420 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table530 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table420.AddRow(new string[] {
+ table530.AddRow(new string[] {
"False",
"True",
""});
#line 25
- await testRunner.AndAsync("the result is", ((string)(null)), table420, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table530, "And ");
#line hidden
- global::Reqnroll.Table table421 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table531 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table421.AddRow(new string[] {
+ table531.AddRow(new string[] {
"41",
"",
"Ping Pong",
"5/24/2024 12:34:56 PM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
#line 28
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table421, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table531, "And ");
#line hidden
- global::Reqnroll.Table table422 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table532 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table422.AddRow(new string[] {
+ table532.AddRow(new string[] {
"41",
"",
"Ping Pong",
"5/24/2024 12:34:56 PM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table422.AddRow(new string[] {
+ table532.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -226,7 +226,7 @@ await testRunner.GivenAsync("the table \'SalesLT.ProductCategory\' filtered by \
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 31
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table422, "And ");
+ "", ((string)(null)), table532, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -253,19 +253,19 @@ public async System.Threading.Tasks.Task Update02()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table423 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table533 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table423.AddRow(new string[] {
+ table533.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table423.AddRow(new string[] {
+ table533.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -273,77 +273,77 @@ public async System.Threading.Tasks.Task Update02()
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 37
await testRunner.GivenAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table423, "Given ");
+ "", ((string)(null)), table533, "Given ");
#line hidden
- global::Reqnroll.Table table424 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table534 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"Name",
"ParentProductCategoryId"});
- table424.AddRow(new string[] {
+ table534.AddRow(new string[] {
"41",
"Ping Pong",
"42"});
#line 41
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table424, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table534, "When ");
#line hidden
- global::Reqnroll.Table table425 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table535 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table425.AddRow(new string[] {
+ table535.AddRow(new string[] {
"model",
"{{model}}",
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 44
- await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table425, "And ");
+ await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table535, "And ");
#line hidden
- global::Reqnroll.Table table426 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table536 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table426.AddRow(new string[] {
+ table536.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 47
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table426, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table536, "Then ");
#line hidden
- global::Reqnroll.Table table427 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table537 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table427.AddRow(new string[] {
+ table537.AddRow(new string[] {
"False",
"True",
""});
#line 50
- await testRunner.AndAsync("the result is", ((string)(null)), table427, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table537, "And ");
#line hidden
- global::Reqnroll.Table table428 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table538 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table428.AddRow(new string[] {
+ table538.AddRow(new string[] {
"41",
"42",
"Ping Pong",
"5/24/2024 12:34:56 PM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
#line 53
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table428, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table538, "And ");
#line hidden
- global::Reqnroll.Table table429 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table539 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table429.AddRow(new string[] {
+ table539.AddRow(new string[] {
"41",
"42",
"Ping Pong",
"5/24/2024 12:34:56 PM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table429.AddRow(new string[] {
+ table539.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -351,7 +351,7 @@ await testRunner.GivenAsync("the table \'SalesLT.ProductCategory\' filtered by \
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 56
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table429, "And ");
+ "", ((string)(null)), table539, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -378,19 +378,19 @@ public async System.Threading.Tasks.Task Update03()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table430 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table540 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table430.AddRow(new string[] {
+ table540.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table430.AddRow(new string[] {
+ table540.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -398,77 +398,77 @@ public async System.Threading.Tasks.Task Update03()
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 61
await testRunner.GivenAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table430, "Given ");
+ "", ((string)(null)), table540, "Given ");
#line hidden
- global::Reqnroll.Table table431 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table541 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"Name",
"ParentProductCategoryId"});
- table431.AddRow(new string[] {
+ table541.AddRow(new string[] {
"41",
"Tires and Tubes",
"42"});
#line 65
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table431, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table541, "When ");
#line hidden
- global::Reqnroll.Table table432 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table542 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table432.AddRow(new string[] {
+ table542.AddRow(new string[] {
"model",
"{{model}}",
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 68
- await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table432, "And ");
+ await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table542, "And ");
#line hidden
- global::Reqnroll.Table table433 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table543 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table433.AddRow(new string[] {
+ table543.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 71
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table433, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table543, "Then ");
#line hidden
- global::Reqnroll.Table table434 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table544 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table434.AddRow(new string[] {
+ table544.AddRow(new string[] {
"False",
"True",
""});
#line 74
- await testRunner.AndAsync("the result is", ((string)(null)), table434, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table544, "And ");
#line hidden
- global::Reqnroll.Table table435 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table545 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table435.AddRow(new string[] {
+ table545.AddRow(new string[] {
"41",
"42",
"Tires and Tubes",
"5/24/2024 12:34:56 PM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
#line 77
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table435, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table545, "And ");
#line hidden
- global::Reqnroll.Table table436 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table546 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table436.AddRow(new string[] {
+ table546.AddRow(new string[] {
"41",
"42",
"Tires and Tubes",
"5/24/2024 12:34:56 PM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table436.AddRow(new string[] {
+ table546.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -476,7 +476,7 @@ await testRunner.GivenAsync("the table \'SalesLT.ProductCategory\' filtered by \
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 80
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table436, "And ");
+ "", ((string)(null)), table546, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -503,19 +503,19 @@ public async System.Threading.Tasks.Task UpdateInvalidName()
#line 7
await this.FeatureBackgroundAsync();
#line hidden
- global::Reqnroll.Table table437 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table547 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table437.AddRow(new string[] {
+ table547.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table437.AddRow(new string[] {
+ table547.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -523,82 +523,82 @@ public async System.Threading.Tasks.Task UpdateInvalidName()
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 87
await testRunner.GivenAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table437, "Given ");
+ "", ((string)(null)), table547, "Given ");
#line hidden
- global::Reqnroll.Table table438 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table548 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"Name",
"ParentProductCategoryId"});
- table438.AddRow(new string[] {
+ table548.AddRow(new string[] {
"41",
"Hi",
"42"});
#line 91
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table438, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table548, "When ");
#line hidden
- global::Reqnroll.Table table439 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table549 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table439.AddRow(new string[] {
+ table549.AddRow(new string[] {
"model",
"{{model}}",
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 94
- await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table439, "And ");
+ await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table549, "And ");
#line hidden
- global::Reqnroll.Table table440 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table550 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table440.AddRow(new string[] {
+ table550.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 97
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table440, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table550, "Then ");
#line hidden
- global::Reqnroll.Table table441 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table551 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess"});
- table441.AddRow(new string[] {
+ table551.AddRow(new string[] {
"True",
"False"});
#line 100
- await testRunner.AndAsync("the result is", ((string)(null)), table441, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table551, "And ");
#line hidden
- global::Reqnroll.Table table442 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table552 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table442.AddRow(new string[] {
+ table552.AddRow(new string[] {
"\'Name\' must be between 3 and 50 characters. You entered 2 characters."});
#line 103
- await testRunner.AndAsync("the results property \'Message\' contains", ((string)(null)), table442, "And ");
+ await testRunner.AndAsync("the results property \'Message\' contains", ((string)(null)), table552, "And ");
#line hidden
- global::Reqnroll.Table table443 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table553 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table443.AddRow(new string[] {
+ table553.AddRow(new string[] {
"41",
"42",
"Hi",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
#line 106
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table443, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table553, "And ");
#line hidden
- global::Reqnroll.Table table444 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table554 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table444.AddRow(new string[] {
+ table554.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table444.AddRow(new string[] {
+ table554.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -606,7 +606,7 @@ await testRunner.GivenAsync("the table \'SalesLT.ProductCategory\' filtered by \
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 109
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table444, "And ");
+ "", ((string)(null)), table554, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -636,75 +636,75 @@ public async System.Threading.Tasks.Task UpdateNoChange()
#line 115
await testRunner.GivenAsync("I don\'t reset the database after the scenario", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given ");
#line hidden
- global::Reqnroll.Table table445 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table555 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name"});
- table445.AddRow(new string[] {
+ table555.AddRow(new string[] {
"41",
"4",
"Tires and Tubes"});
#line 116
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table445, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table555, "When ");
#line hidden
- global::Reqnroll.Table table446 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table556 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table446.AddRow(new string[] {
+ table556.AddRow(new string[] {
"model",
"{{model}}",
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 119
- await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table446, "And ");
+ await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table556, "And ");
#line hidden
- global::Reqnroll.Table table447 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table557 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table447.AddRow(new string[] {
+ table557.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 122
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table447, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table557, "Then ");
#line hidden
- global::Reqnroll.Table table448 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table558 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table448.AddRow(new string[] {
+ table558.AddRow(new string[] {
"False",
"True",
"Record is already up to date!"});
#line 125
- await testRunner.AndAsync("the result is", ((string)(null)), table448, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table558, "And ");
#line hidden
- global::Reqnroll.Table table449 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table559 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table449.AddRow(new string[] {
+ table559.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
#line 128
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table449, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table559, "And ");
#line hidden
- global::Reqnroll.Table table450 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table560 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table450.AddRow(new string[] {
+ table560.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table450.AddRow(new string[] {
+ table560.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -712,7 +712,7 @@ public async System.Threading.Tasks.Task UpdateNoChange()
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 131
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table450, "And ");
+ "", ((string)(null)), table560, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
@@ -742,75 +742,75 @@ public async System.Threading.Tasks.Task UpdateUnknownRecord()
#line 137
await testRunner.GivenAsync("I don\'t reset the database after the scenario", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given ");
#line hidden
- global::Reqnroll.Table table451 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table561 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name"});
- table451.AddRow(new string[] {
+ table561.AddRow(new string[] {
"1234",
"4",
"UpdateUnknownRecord"});
#line 138
- await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table451, "When ");
+ await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table561, "When ");
#line hidden
- global::Reqnroll.Table table452 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table562 = new global::Reqnroll.Table(new string[] {
"Key",
"Value",
"TypeName"});
- table452.AddRow(new string[] {
+ table562.AddRow(new string[] {
"model",
"{{model}}",
"AdventureWorksDemo.Data.Models.ProductCategoryModel"});
#line 141
- await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table452, "And ");
+ await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table562, "And ");
#line hidden
- global::Reqnroll.Table table453 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table563 = new global::Reqnroll.Table(new string[] {
"Expected"});
- table453.AddRow(new string[] {
+ table563.AddRow(new string[] {
"AdventureWorksDemo.Data.Models.ServiceResult"});
#line 144
- await testRunner.ThenAsync("the result is of type", ((string)(null)), table453, "Then ");
+ await testRunner.ThenAsync("the result is of type", ((string)(null)), table563, "Then ");
#line hidden
- global::Reqnroll.Table table454 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table564 = new global::Reqnroll.Table(new string[] {
"IsFailure",
"IsSuccess",
"Message"});
- table454.AddRow(new string[] {
+ table564.AddRow(new string[] {
"True",
"False",
"Unable to locate record to update!"});
#line 148
- await testRunner.AndAsync("the result is", ((string)(null)), table454, "And ");
+ await testRunner.AndAsync("the result is", ((string)(null)), table564, "And ");
#line hidden
- global::Reqnroll.Table table455 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table565 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table455.AddRow(new string[] {
+ table565.AddRow(new string[] {
"1234",
"4",
"UpdateUnknownRecord",
"1/1/0001 12:00:00 AM",
"00000000-0000-0000-0000-000000000000"});
#line 152
- await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table455, "And ");
+ await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table565, "And ");
#line hidden
- global::Reqnroll.Table table456 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table566 = new global::Reqnroll.Table(new string[] {
"ProductCategoryId",
"ParentProductCategoryId",
"Name",
"ModifiedDate",
"Rowguid"});
- table456.AddRow(new string[] {
+ table566.AddRow(new string[] {
"41",
"4",
"Tires and Tubes",
"6/1/2002 12:00:00 AM",
"3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"});
- table456.AddRow(new string[] {
+ table566.AddRow(new string[] {
"42",
"",
"Record to Delete",
@@ -818,7 +818,7 @@ public async System.Threading.Tasks.Task UpdateUnknownRecord()
"3c17c9ae-e906-48b4-bdd3-000000000001"});
#line 155
await testRunner.AndAsync("the table \'SalesLT.ProductCategory\' filtered by \'ProductCategoryId > 40\' contains" +
- "", ((string)(null)), table456, "And ");
+ "", ((string)(null)), table566, "And ");
#line hidden
}
await this.ScenarioCleanupAsync();
diff --git a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Helpers/HelperScenarioContext.cs b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Helpers/HelperScenarioContext.cs
index 43c8dc1..0274a54 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Helpers/HelperScenarioContext.cs
+++ b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Helpers/HelperScenarioContext.cs
@@ -18,7 +18,17 @@ internal static class ScenarioContexts
internal static void AddToContext(ScenarioContextKey key, object? value)
{
- Context?.Add(key.ToString(), value);
+ if (Context == null)
+ return;
+ if (Context!.ContainsKey(key.ToString()))
+ throw new ArgumentException( $"{key} already exists in the ScenarioContext!");
+ Context!.Add(key.ToString(), value);
+ }
+
+ internal static void ClearResult()
+ {
+ RemoveObjectFromContext(ScenarioContextKey.Result);
+ RemoveObjectFromContext(ScenarioContextKey.ResultType);
}
internal static dynamic Get(ScenarioContextKey key) => Context!.Get(key.ToString());
@@ -69,6 +79,18 @@ internal static void UpdateFlag(ScenarioContextKey key, bool flag)
AddToContext(key, flag);
}
}
+
+ internal static void UpdateObjectInContext(ScenarioContextKey key, object? value)
+ {
+ RemoveObjectFromContext(key);
+ AddToContext(key, value);
+ }
+
+ private static void RemoveObjectFromContext(ScenarioContextKey key)
+ {
+ if (Context!.ContainsKey(key.ToString()))
+ Context!.Remove(key.ToString());
+ }
}
}
}
\ No newline at end of file
diff --git a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Helpers/HelperTypes.cs b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Helpers/HelperTypes.cs
index bd1212c..1d4cbb5 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Helpers/HelperTypes.cs
+++ b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Helpers/HelperTypes.cs
@@ -214,6 +214,12 @@ internal static dynamic PopulateModelFromRow(dynamic entity, DataTableRow row, s
pi.SetValue(entity, ls, null);
continue;
}
+ if (pi.PropertyType == typeof(string[]))
+ {
+ var ls = row[fieldname].Split(',').Select(item => item.InterpretValue().Trim()).ToArray();
+ pi.SetValue(entity, ls, null);
+ continue;
+ }
var t = Nullable.GetUnderlyingType(pi.PropertyType) ?? pi.PropertyType;
var safeValue = (row[fieldname] == null) ? null : Convert.ChangeType(row[fieldname].InterpretValue(), t);
pi.SetValue(entity, safeValue, null);
diff --git a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/StepDefinitions/StepDefinitions.cs b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/StepDefinitions/StepDefinitions.cs
index 57621fe..1720927 100644
--- a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/StepDefinitions/StepDefinitions.cs
+++ b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/StepDefinitions/StepDefinitions.cs
@@ -22,6 +22,12 @@ public StepDefinitions(ScenarioContext scenarioContext)
Helper.ScenarioContexts.Context = scenarioContext;
}
+ [Given("I clear the previous results")]
+ public void GivenIClearThePreviousResults()
+ {
+ Helper.ScenarioContexts.ClearResult();
+ }
+
[Given("The service to test is {string}")]
public void GivenTheServiceToTestIs(string uotName)
{
@@ -148,24 +154,7 @@ public virtual void ThenTheResultIsOfType(DataTable table)
[Then("the results are")]
public void ThenTheResultsAre(DataTable table)
{
- IEnumerable actual = (IEnumerable)Helper.ScenarioContexts.GetResult;
- string? resultTypeName = Helper.ScenarioContexts.GetContextResultTypeName();
-
- if (actual is Array)
- resultTypeName = resultTypeName!.ToString().Split('[')[0];
- else
- resultTypeName = resultTypeName!.ToString().Replace("`1", "").Replace("[", "<").Replace("]", ">")
- .Replace(">", "")
- .Split('<')[1];
-
- switch (resultTypeName)
- {
- case "System.Exception": table.CompareToSet([resultTypeName]); break;
- case "AdventureWorksDemo.Data.Models.AddressModel": table.CompareToSet((IEnumerable)actual); break;
- case "AdventureWorksDemo.Data.Models.ProductCategoryModel": table.CompareToSet((IEnumerable)actual); break;
- case "AdventureWorksDemo.Data.Models.ProductDescriptionModel": table.CompareToSet((IEnumerable)actual); break;
- default: throw new NotImplementedException($"Type [{resultTypeName}] is not implemented!");
- }
+ CompareResults(table, false);
}
[Then("the results property {string} contains")]
@@ -187,7 +176,7 @@ public void ThenTheResultsPropertyContains(string propertyName, DataTable dataTa
}
else if (value is not IEnumerable)
{
- values = createList(valueType);
+ values = CreateList(valueType);
values.Add(value);
}
else
@@ -195,6 +184,12 @@ public void ThenTheResultsPropertyContains(string propertyName, DataTable dataTa
CompareDataTableWithResult(dataTable, values);
}
+ [Then("the sorted results are")]
+ public void ThenTheSortedResultsAre(DataTable table)
+ {
+ CompareResults(table, true);
+ }
+
[When("I call the method {string} with the parameter values")]
public async Task WhenICallTheMethodWithTheParameterValuesAsync(string methodName, DataTable table)
{
@@ -226,12 +221,28 @@ public void WhenIPopulateAListOfTheModel(string modelTypeName, DataTable table)
Helper.ScenarioContexts.AddToContext(ScenarioContextKey.ListOfObjects, models);
}
+ //[When("I populate a list of type {string}")]
+ //public void WhenIPopulateAListOfStrings(string typeName, DataTable dataTable)
+ //{
+ // var list = Helper.Types.CreateListByTypeName(typeName);
+ // for (int i = 0; i < dataTable.Rows.Count; i++)
+ // {
+ // list.Add(dataTable.Rows[i][0]);
+ // }
+ // Helper.ScenarioContexts.AddToContext(ScenarioContextKey.ListOfObjects, list);
+ //}
[When("I populate the model {string}")]
public void WhenIPopulateTheModel(string modelTypeName, DataTable dataTable)
{
var model = Helper.Types.PopulateModelFromRow(modelTypeName, dataTable.Rows[0], null);
Helper.ScenarioContexts.AddToContext(ScenarioContextKey.Model, model);
}
+ [When("I update the model {string}")]
+ public void WhenIUpdateTheModel(string modelTypeName, DataTable dataTable)
+ {
+ var model = Helper.Types.PopulateModelFromRow(modelTypeName, dataTable.Rows[0], null);
+ Helper.ScenarioContexts.UpdateObjectInContext(ScenarioContextKey.Model, model);
+ }
private void CompareDataTableWithResult(DataTable datatable, object value)
{
@@ -239,7 +250,7 @@ private void CompareDataTableWithResult(DataTable datatable, object value)
{
value = ServiceResult.Simple(result);
}
- IList? values = createList(value.GetType());
+ IList? values = CreateList(value.GetType());
values.Add(value);
CompareDataTableWithResult(datatable, values);
}
@@ -257,7 +268,29 @@ private void CompareDataTableWithResult(DataTable datatable, IEnumerable values)
throw new NotImplementedException($"unhandled type!!!\r\n {valueTypeName}");
}
- private IList createList(Type myType)
+ private void CompareResults(DataTable table, bool compareSorted)
+ {
+ IEnumerable actual = (IEnumerable)Helper.ScenarioContexts.GetResult;
+ string? resultTypeName = Helper.ScenarioContexts.GetContextResultTypeName();
+
+ if (actual is Array)
+ resultTypeName = resultTypeName!.ToString().Split('[')[0];
+ else
+ resultTypeName = resultTypeName!.ToString().Replace("`1", "").Replace("[", "<").Replace("]", ">")
+ .Replace(">", "")
+ .Split('<')[1];
+
+ switch (resultTypeName)
+ {
+ case "System.Exception": table.CompareToSet([resultTypeName]); break;
+ case "AdventureWorksDemo.Data.Models.AddressModel": table.CompareToSet((IEnumerable)actual, compareSorted); break;
+ case "AdventureWorksDemo.Data.Models.ProductCategoryModel": table.CompareToSet((IEnumerable)actual, compareSorted); break;
+ case "AdventureWorksDemo.Data.Models.ProductDescriptionModel": table.CompareToSet((IEnumerable)actual, compareSorted); break;
+ default: throw new NotImplementedException($"Type [{resultTypeName}] is not implemented!");
+ }
+ }
+
+ private IList CreateList(Type myType)
{
Type genericListType = typeof(List<>).MakeGenericType(myType);
return (IList)Activator.CreateInstance(genericListType);
diff --git a/src/API/AdventureWorksDemo.Data.Tests/Extentions/QueryExtensionsApplySliceTests.cs b/src/API/AdventureWorksDemo.Data.Tests/Extentions/QueryExtensionsApplySliceTests.cs
index 0c4e3bb..259fdf4 100644
--- a/src/API/AdventureWorksDemo.Data.Tests/Extentions/QueryExtensionsApplySliceTests.cs
+++ b/src/API/AdventureWorksDemo.Data.Tests/Extentions/QueryExtensionsApplySliceTests.cs
@@ -1,5 +1,5 @@
-using AdventureWorksDemo.Data.Paging;
-using AdventureWorksDemo.Data.QueryExtentions;
+using AdventureWorksDemo.Data.Extentions;
+using AdventureWorksDemo.Data.Paging;
namespace AdventureWorksDemo.Data.Tests.Extentions
{
@@ -8,101 +8,56 @@ public class QueryExtensionsApplySliceTests
{
private readonly List _data = ["A1", "A2", "A3", "A4", "A5", "B1", "B2", "B3", "B4", "B5", "C1", "C2", "C3", "C4", "C5"];
- [TestMethod]
- public void ApplySlice_EmptyQuery_ReturnsDefault()
- {
- // Arrange
- var query = Enumerable.Empty().AsQueryable();
-
- // Act
- var result = query.ApplySlice(0, 10);
-
- // Assert
- Assert.IsNull(result);
- }
+ //[TestMethod]
+ //public void ApplySlice_EmptyQuery_ReturnsDefault()
+ //{
+ // // Arrange
+ // var query = Enumerable.Empty().AsQueryable();
- [TestMethod]
- public void ApplySlice_EmptyQuery_ReturnsDefault_WithPageingFilter()
- {
- // Arrange
- var query = Enumerable.Empty().AsQueryable();
-
- // Act
- var result = query.ApplySlice(new PageingFilter());
+ // // Act var result = query.ApplyPageing(new PageingFilter());
- // Assert
- Assert.IsNull(result);
- }
+ // // Assert
+ // Assert.AreEqual(Array.Empty(), result);
+ //}
[TestMethod]
- public void ApplySlice_NegativeSkipOrPageSize_ReturnsOriginalQuery()
+ public void ApplySlice_NegativePageSize_ReturnsOriginalQuery()
{
// Arrange
var query = _data.AsQueryable();
-
+ var filterNegativePageSize = new PageingFilter() { PageNumber = 0, PageSize = -2 };
// Act
- var resultNegativeSkip = query.ApplySlice(-1, 2);
- var resultNegativePageSize = query.ApplySlice(1, -2);
+ var resultNegativePageSize = query.ApplyPageing(filterNegativePageSize);
// Assert
- CollectionAssert.AreEqual(query.ToList(), resultNegativeSkip.ToList());
- CollectionAssert.AreEqual(query.ToList(), resultNegativePageSize.ToList());
+ CollectionAssert.AreEqual(_data, resultNegativePageSize.ToList());
}
[TestMethod]
- public void ApplySlice_NegativeSkipOrPageSize_ReturnsOriginalQuery_WithPageingFilter()
+ public void ApplySlice_NegativeSkip_ReturnsOriginalQuery()
{
// Arrange
var query = _data.AsQueryable();
var filterNegativeSkip = new PageingFilter() { PageNumber = -1, PageSize = 2 };
- var filterNegativePageSize = new PageingFilter() { PageNumber = 1, PageSize = -2 };
// Act
- var resultNegativeSkip = query.ApplySlice(filterNegativeSkip);
- var resultNegativePageSize = query.ApplySlice(filterNegativePageSize);
+ var resultNegativeSkip = query.ApplyPageing(filterNegativeSkip);
// Assert
CollectionAssert.AreEqual(_data[0..2], resultNegativeSkip.ToList());
- CollectionAssert.AreEqual(_data, resultNegativePageSize.ToList());
- }
-
- [TestMethod]
- public void ApplySlice_NullQuery_ReturnsDefault()
- {
- // Arrange
- IQueryable? query = null;
-
- // Act
- var result = query!.ApplySlice(0, 10);
-
- // Assert
- Assert.IsNull(result);
- }
-
- [TestMethod]
- public void ApplySlice_NullQuery_ReturnsDefault_WithPageingFilter()
- {
- // Arrange
- IQueryable? query = null;
- var filter = new PageingFilter() { PageNumber = 1, PageSize = 5 };
- // Act
- var result = query!.ApplySlice(filter);
-
- // Assert
- Assert.IsNull(result);
}
- [TestMethod]
- public void ApplySlice_PageSizeGreaterThanRemaining_ReturnsRemainingElements()
- {
- // Arrange
- var query = _data.AsQueryable();
-
- // Act
- var result = query.ApplySlice(2, 100);
+ //[TestMethod]
+ //public void ApplySlice_NullQuery_ReturnsDefault()
+ //{
+ // // Arrange
+ // IQueryable? query = null;
+ // var filter = new PageingFilter() { PageNumber = 1, PageSize = 5 };
+ // // Act
+ // var result = query!.ApplyPageing(filter);
- // Assert
- CollectionAssert.AreEqual(_data[2..15], result.ToList());
- }
+ // // Assert
+ // Assert.IsNull(result);
+ //}
[TestMethod]
public void ApplySlice_PageSizeGreaterThanRemaining_ReturnsRemainingElements_WithPagingFilter()
@@ -111,7 +66,7 @@ public void ApplySlice_PageSizeGreaterThanRemaining_ReturnsRemainingElements_Wit
var query = _data.AsQueryable();
var filter = new PageingFilter() { PageNumber = 2, PageSize = 100 };
// Act
- var result = query.ApplySlice(filter);
+ var result = query.ApplyPageing(filter);
// Assert
CollectionAssert.AreEqual(_data[15..15], result.ToList());
@@ -119,57 +74,32 @@ public void ApplySlice_PageSizeGreaterThanRemaining_ReturnsRemainingElements_Wit
[TestMethod]
public void ApplySlice_SkipBeyondCount_ReturnsEmpty()
- {
- // Arrange
- var query = _data.AsQueryable();
-
- // Act
- var result = query.ApplySlice(20, 2);
-
- // Assert
- Assert.AreEqual(0, result.Count());
- }
-
- [TestMethod]
- public void ApplySlice_SkipBeyondCount_ReturnsEmpty_WithPageingFilter()
{
// Arrange
var query = _data.AsQueryable();
var filter = new PageingFilter() { PageNumber = 20, PageSize = 2 };
// Act
- var result = query.ApplySlice(filter);
+ var result = query.ApplyPageing(filter);
// Assert
Assert.AreEqual(0, result.Count());
}
+ [DataRow(0, 2, 0, 2)]
+ [DataRow(0, 10, 0, 10)]
[TestMethod]
- public void ApplySlice_ValidQueryWithSlicing_ReturnsExpectedSlice()
- {
- // Arrange
- var query = _data.AsQueryable();
-
- // Act
- var result = query.ApplySlice(1, 2);
-
- // Assert
- CollectionAssert.AreEqual(_data[1..3], result.ToList());
- }
-
- [DataRow(1, 2, 0, 2)]
- [DataRow(1, 10, 0, 10)]
- [TestMethod]
- public void ApplySlice_ValidQueryWithSlicing_ReturnsExpectedSlice_WithPageingFilter(int pageNumber, int pageSize, int dataStart, int dataEnd)
+ public void ApplySlice_ValidQueryWithSlicing_ReturnsExpectedSlice(int pageNumber, int pageSize, int dataStart, int dataEnd)
{
// Arrange
var query = _data.AsQueryable();
var filter = new PageingFilter() { PageNumber = pageNumber, PageSize = pageSize };
// Act
- var result = query.ApplySlice(filter);
+ var result = query.ApplyPageing(filter)!.ToList();
// Assert
- CollectionAssert.AreEqual(_data[dataStart..dataEnd], result.ToList());
+ var expected = _data[dataStart..dataEnd];
+ CollectionAssert.AreEqual(expected, result, $"Expected {expected.Count} records. {result.Count} records returned!");
}
}
}
\ No newline at end of file
diff --git a/src/API/AdventureWorksDemo.Data.Tests/Pageing/PagingFilterTests.cs b/src/API/AdventureWorksDemo.Data.Tests/Pageing/PagingFilterTests.cs
index 041f866..847699e 100644
--- a/src/API/AdventureWorksDemo.Data.Tests/Pageing/PagingFilterTests.cs
+++ b/src/API/AdventureWorksDemo.Data.Tests/Pageing/PagingFilterTests.cs
@@ -13,7 +13,7 @@ public void PageNumber_SetNegativeValue_ResetsToOne()
var filter = new PageingFilter { PageNumber = -5 };
// Assert
- Assert.AreEqual(1, filter.PageNumber);
+ Assert.AreEqual(0, filter.PageNumber);
}
[TestMethod]
@@ -37,27 +37,31 @@ public void PageSize_SetValueAboveMax_SetsToMaxPageSize()
}
[TestMethod]
- public void Skip_CalculatesCorrectly()
+ public void Sanitise_ResetsInvalidValues()
{
// Arrange
- var filter = new PageingFilter { PageNumber = 3, PageSize = 20 };
+ var filter = new PageingFilter { PageNumber = 0, PageSize = 0 };
+
+ // Act
+ filter.Sanitise();
// Assert
- Assert.AreEqual(40, filter.Skip);
+ Assert.AreEqual(0, filter.PageNumber);
+ Assert.AreEqual(25, filter.PageSize);
}
+ [DataRow(0, 5, 0)]
+ [DataRow(0, 20, 0)]
+ [DataRow(1, 20, 20)]
+ [DataRow(2, 20, 40)]
[TestMethod]
- public void VerifyValues_ResetsInvalidValues()
+ public void Skip_CalculatesCorrectly(int pageNumber, int pageSize, int expectedSkip)
{
// Arrange
- var filter = new PageingFilter { PageNumber = 0, PageSize = 0 };
-
- // Act
- filter.VerifyValues();
+ var filter = new PageingFilter { PageNumber = pageNumber, PageSize = pageSize };
// Assert
- Assert.AreEqual(1, filter.PageNumber);
- Assert.AreEqual(25, filter.PageSize);
+ Assert.AreEqual(expectedSkip, filter.Skip);
}
}
}
\ No newline at end of file
diff --git a/src/API/AdventureWorksDemo.Data/Extentions/IQueryableExtensionsPaging.cs b/src/API/AdventureWorksDemo.Data/Extentions/IQueryableExtensionsPaging.cs
new file mode 100644
index 0000000..d7baaac
--- /dev/null
+++ b/src/API/AdventureWorksDemo.Data/Extentions/IQueryableExtensionsPaging.cs
@@ -0,0 +1,63 @@
+using System.Linq.Expressions;
+using System.Reflection;
+
+using AdventureWorksDemo.Data.Paging;
+
+namespace AdventureWorksDemo.Data.Extentions
+{
+ public static class IQueryableExtensionsPaging
+ {
+ public static IQueryable? ApplyPageing(this IQueryable? query, PageingFilter? filter) //where T : class
+ {
+ if (filter == null || !query.Any())
+ return query;
+ if (query == null || !query.Any())
+ return default!;
+
+ filter.Sanitise();
+
+ // //
+ return query
+ .Skip(filter.Skip)
+ .Take(filter.PageSize);
+ }
+
+ public static IQueryable? ApplySorting(this IQueryable? query, PageingFilter filter)
+ {
+ if (filter?.Sorting == null || filter.Sorting.Length == 0)
+ return query; // No sorting applied if Sorting is null or empty
+
+ IOrderedQueryable? orderedQuery = null;
+
+ foreach (var sortExpression in filter.Sorting)
+ {
+ var parts = sortExpression.Trim().Split(' '); // e.g., "Description" or "ModifiedDate DESC"
+ string propertyName = parts[0];
+ bool descending = parts.Length > 1 && parts[1].Equals("DESC", StringComparison.OrdinalIgnoreCase);
+
+ // Get the property info
+ var property = typeof(T).GetProperty(propertyName, BindingFlags.Public | BindingFlags.Instance | BindingFlags.IgnoreCase);
+ if (property == null)
+ throw new ArgumentException($"Property '{propertyName}' not found on type '{typeof(T).Name}'.");
+
+ // Build the sorting expression dynamically
+ var parameter = Expression.Parameter(typeof(T), "x");
+ var propertyAccess = Expression.Property(parameter, property);
+ var lambda = Expression.Lambda(propertyAccess, parameter);
+
+ var methodName = orderedQuery == null
+ ? (descending ? "OrderByDescending" : "OrderBy")
+ : (descending ? "ThenByDescending" : "ThenBy");
+
+ var method = typeof(Queryable).GetMethods()
+ .First(m => m.Name == methodName &&
+ m.GetParameters().Length == 2)
+ .MakeGenericMethod(typeof(T), property.PropertyType);
+
+ orderedQuery = method.Invoke(null, [orderedQuery ?? query, lambda]) as IOrderedQueryable;
+ }
+
+ return orderedQuery ?? query;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/API/AdventureWorksDemo.Data/Extentions/QueryExtensions.cs b/src/API/AdventureWorksDemo.Data/Extentions/QueryExtensions.cs
deleted file mode 100644
index 8f903bf..0000000
--- a/src/API/AdventureWorksDemo.Data/Extentions/QueryExtensions.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-using AdventureWorksDemo.Data.Paging;
-
-using static Azure.Core.HttpHeader;
-
-namespace AdventureWorksDemo.Data.QueryExtentions
-{
- public static class QueryExtensions
- {
- public static IQueryable ApplyQuery(this IQueryable