diff --git a/src/.editorconfig b/src/.editorconfig new file mode 100644 index 0000000..0cdcb7c --- /dev/null +++ b/src/.editorconfig @@ -0,0 +1,4 @@ +[*.cs] + +# Default severity for analyzer diagnostics with category 'Major Code Smell' +dotnet_analyzer_diagnostic.category-Major Code Smell.severity = none diff --git a/src/API/AdventureWorksDemo.API/AdventureWorksDemo.API.csproj b/src/API/AdventureWorksDemo.API/AdventureWorksDemo.API.csproj index 2e207ab..474672e 100644 --- a/src/API/AdventureWorksDemo.API/AdventureWorksDemo.API.csproj +++ b/src/API/AdventureWorksDemo.API/AdventureWorksDemo.API.csproj @@ -9,8 +9,10 @@ - - + + + + 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.API/appsettings.Development.json b/src/API/AdventureWorksDemo.API/appsettings.Development.json index 5f773e2..b4185ce 100644 --- a/src/API/AdventureWorksDemo.API/appsettings.Development.json +++ b/src/API/AdventureWorksDemo.API/appsettings.Development.json @@ -1,7 +1,7 @@ { "Logging": { "LogLevel": { - "Default": "Information", + "Default": "Trace", "Microsoft.AspNetCore": "Warning" } }, 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..529d730 --- /dev/null +++ b/src/API/AdventureWorksDemo.Common.Tests.Extensions/AdventureWorksDemo.Common.Tests.Extensions.csproj @@ -0,0 +1,12 @@ + + + + net9.0 + enable + enable + + + + true + + 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 71% rename from src/API/AdventureWorksDemo.Common.Tests/Extensions/StringExtensions.cs rename to src/API/AdventureWorksDemo.Common.Tests.Extensions/StringExtensions.cs index de8aa07..ebcb956 100644 --- a/src/API/AdventureWorksDemo.Common.Tests/Extensions/StringExtensions.cs +++ b/src/API/AdventureWorksDemo.Common.Tests.Extensions/StringExtensions.cs @@ -1,20 +1,25 @@ -namespace AdventureWorksDemo.Common.Tests.Extensions +using System.Text; + +namespace AdventureWorksDemo.Common.Tests.Extensions { public static class StringExtensions { + private const string DateTimeFormat = "dd MMM yyyy hh:mm:ss"; + public static string FullNameReadable(this Type t) { - var value = t.FullName; + var sb = new StringBuilder(); + sb.Append(t.FullName); - if (!value!.Contains('[')) return value; - value = t.FullName!.Split('`')[0] + "<"; + if (!sb.ToString()!.Contains('[')) + return sb.ToString(); + sb.Clear(); + sb.Append(t.FullName!.Split('`')[0] + "<"); foreach (var item in t.GenericTypeArguments) { - value += item.FullName + ", "; + sb.Append(item.FullName + ", "); } - value = (value + ">").Replace(", >", ">"); - - return value; + return (sb.ToString() + ">").Replace(", >", ">"); } public static string InterpretValue(this string value) @@ -25,11 +30,11 @@ public static string InterpretValue(this string value) } value = value.Replace("{{pipe}}", "|") - .Replace("{{DateTime.Now}}", DateTime.Now.ToString("dd MMM yyyy hh:mm:ss")) - .Replace("{{DateTime.UtcNow}}", DateTime.UtcNow.ToString("dd MMM yyyy hh:mm:ss")) - .Replace("{{DateTime.UTCLastWeek}}", DateTime.UtcNow.AddDays(-7).ToString("dd MMM yyyy hh:mm:ss")) - .Replace("{{DateTime.UTCNextWeek}}", DateTime.UtcNow.AddDays(7).ToString("dd MMM yyyy hh:mm:ss")) - .Replace("{{DateTime.UTCLastWeek}}", DateTime.UtcNow.AddDays(-7).ToString("dd MMM yyyy hh:mm:ss")) + .Replace("{{DateTime.Now}}", DateTime.Now.ToString(DateTimeFormat)) + .Replace("{{DateTime.UtcNow}}", DateTime.UtcNow.ToString(DateTimeFormat)) + .Replace("{{DateTime.UTCLastWeek}}", DateTime.UtcNow.AddDays(-7).ToString(DateTimeFormat)) + .Replace("{{DateTime.UTCNextWeek}}", DateTime.UtcNow.AddDays(7).ToString(DateTimeFormat)) + .Replace("{{DateTime.UTCLastWeek}}", DateTime.UtcNow.AddDays(-7).ToString(DateTimeFormat)) .Replace("{{DateTime.Tomorrow}}", DateTime.Today.AddDays(1).ToString("dd MMM yyyy")) .Replace("{{DateTime.TomorrowResult}}", DateTime.Today.AddDays(1).ToString("M/d/yyyy 12:00:00 AM")) .Replace("{{CrLf}}", "\r\n"); @@ -47,6 +52,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.Common.Tests/AdventureWorksDemo.Common.Tests.csproj b/src/API/AdventureWorksDemo.Common.Tests/AdventureWorksDemo.Common.Tests.csproj index 23292ba..d78c8d7 100644 --- a/src/API/AdventureWorksDemo.Common.Tests/AdventureWorksDemo.Common.Tests.csproj +++ b/src/API/AdventureWorksDemo.Common.Tests/AdventureWorksDemo.Common.Tests.csproj @@ -4,24 +4,29 @@ net9.0 enable enable - + + + true - - - - - - - + + + + + + - + - - - + + + + + + + diff --git a/src/API/AdventureWorksDemo.Common.Tests/DockerMsSqlServerDatabase.cs b/src/API/AdventureWorksDemo.Common.Tests/DockerMsSqlServerDatabase.cs index 27e8270..15b387b 100644 --- a/src/API/AdventureWorksDemo.Common.Tests/DockerMsSqlServerDatabase.cs +++ b/src/API/AdventureWorksDemo.Common.Tests/DockerMsSqlServerDatabase.cs @@ -34,7 +34,7 @@ public DockerMsSqlServerDatabase(string databaseName) } public readonly string DatabaseName; - internal Microsoft.Extensions.Configuration.IConfiguration? configuration; + // internal Microsoft.Extensions.Configuration.IConfiguration? configuration; private const string Image = "mcr.microsoft.com/mssql/server"; private const string Password = "!Passw0rd"; private const string Tag = "latest"; 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 b3e9b00..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 + latest enable enable - false - true - false - - - - - - - - - + all runtime; 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 7b0b211..d60a679 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 @@ -4,26 +4,28 @@ net9.0 enable enable + + + true - - - - - - - + + + + + + - + - - - + + + @@ -33,6 +35,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/Find/AddressServiceFindTests.feature similarity index 55% 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 dc9208d..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 | Count | Capacity | - | 2 | 8 | 5 | 1 | 5 | 5 | - 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,23 +42,23 @@ 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 | - 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 | + | 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 | + | 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' | 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,13 +66,14 @@ 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 | - 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 | + | 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_2_8 When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter' @@ -85,9 +86,9 @@ 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 | - 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 | Count | Capacity | - | 1 | 8 | 8 | 2 | 0 | 0 | - 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 | Count | Capacity | - | 2 | 8 | 5 | 1234 | 0 | 0 | - 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' @@ -130,11 +134,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 | 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: FindAllAsync_0_5 When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter' | PageNumber | PageSize | @@ -143,12 +159,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 | 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' @@ -158,12 +181,22 @@ 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 | + | 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 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/Find/ProductDescriptionServiceFindAllAsyncTests.feature b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/Find/ProductDescriptionServiceFindAllAsyncTests.feature new file mode 100644 index 0000000..6f5a151 --- /dev/null +++ b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/Find/ProductDescriptionServiceFindAllAsyncTests.feature @@ -0,0 +1,352 @@ +Feature: ProductDescriptionServiceFindAllAsyncTests + +System tests for the ProductDescriptionService +Testing the methods FindAllAsync + +Background: + Given The service to test is 'AdventureWorksDemo.Data.Services.IProductDescriptionService' + +Scenario: FindAllAsync_0_5 + When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter' + | PageNumber | PageSize | + | 0 | 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 | 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. | + +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' + | PageNumber | PageSize | + | 1 | 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_2_5 + When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter' + | PageNumber | PageSize | + | 2 | 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 | 2 | + 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' + | PageNumber | PageSize | + | 2 | 8 | + 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 | + | 5 | 37 | 8 | 2 | + 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 | + | 2 | 8 | + 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 | + | 5 | 37 | 8 | 2 | + 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' + | PageNumber | PageSize | + | 1234 | 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_0_0 + When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter' + | PageNumber | PageSize | + | 0 | 0 | + 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 | + | 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. | + | 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_7_5 + When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter' + | PageNumber | PageSize | + | 7 | 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_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' + | PageNumber | PageSize | + | 5 | 0 | + 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 | + | 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/ProduceDescriptionService/ProductDescriptionServiceFindTests.feature b/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/ProductDescriptionServiceFindTests.feature deleted file mode 100644 index 686b1cc..0000000 --- a/src/API/AdventureWorksDemo.Data.Tests.reqnroll/Features/Services/ProduceDescriptionService/ProductDescriptionServiceFindTests.feature +++ /dev/null @@ -1,243 +0,0 @@ -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: 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 - 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 | Count | Capacity | - | 8 | 37 | 5 | 1 | 5 | 5 | - 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_1_500 - When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter' - | PageNumber | PageSize | - | 1 | 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 | Count | Capacity | - | 1 | 37 | 100 | 1 | 37 | 37 | - 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. | - | 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_2_5 - When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter' - | PageNumber | PageSize | - | 2 | 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 | Count | Capacity | - | 8 | 37 | 5 | 2 | 5 | 5 | - 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. | - -Scenario: FindAllAsync_2_8 - When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter' - | PageNumber | PageSize | - | 2 | 8 | - 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 | Count | Capacity | - | 5 | 37 | 8 | 2 | 8 | 8 | - 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. | - -Scenario: FindAllAsync_20_20 - When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter' - | PageNumber | PageSize | - | 2 | 8 | - 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 | Count | Capacity | - | 5 | 37 | 8 | 2 | 8 | 8 | - 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. | - -Scenario: FindAllAsync_1234_5 - When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter' - | PageNumber | PageSize | - | 1234 | 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 | Count | Capacity | - | 8 | 37 | 5 | 1234 | 0 | 0 | - And the results are - | ProductDescriptionId | ModifiedDate | Rowguid | Description | - -Scenario: FindAllAsync_0_0 - When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter' - | PageNumber | PageSize | - | 0 | 0 | - 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 | - | System.ArgumentOutOfRangeException | - And the exception message is - | Expected | - | Parameter pageNumber must be positive (Parameter 'pageNumber') | -Scenario: FindAllAsync_0_5 - When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter' - | PageNumber | PageSize | - | 0 | 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 | - | System.ArgumentOutOfRangeException | - And the exception message is - | Expected | - | Parameter pageNumber must be positive (Parameter 'pageNumber') | - - -Scenario: FindAllAsync_5_0 - When I populate the model 'AdventureWorksDemo.Data.Paging.PagingFilter' - | PageNumber | PageSize | - | 5 | 0 | - 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 | - | System.ArgumentOutOfRangeException | - And the exception message is - | Expected | - | Parameter pageSize must be positive (Parameter 'pageSize') | 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..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 table302 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table403 = new global::Reqnroll.Table(new string[] { "Name", "ParentProductCategoryId", "Rowguid"}); - table302.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)), table302, "When "); + await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table403, "When "); #line hidden - global::Reqnroll.Table table303 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table404 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table303.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)), table303, "And "); + await testRunner.AndAsync("I call the method \'AddAsync\' with the parameter values", ((string)(null)), table404, "And "); #line hidden - global::Reqnroll.Table table304 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table405 = new global::Reqnroll.Table(new string[] { "Expected"}); - table304.AddRow(new string[] { + table405.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)), table405, "Then "); #line hidden - global::Reqnroll.Table table305 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table406 = new global::Reqnroll.Table(new string[] { "IsFailure", "IsSuccess", "Message"}); - table305.AddRow(new string[] { + table406.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)), table406, "And "); #line hidden - global::Reqnroll.Table table306 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table407 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table306.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)), table306, "And "); + await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table407, "And "); #line hidden - global::Reqnroll.Table table307 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table408 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table307.AddRow(new string[] { + table408.AddRow(new string[] { "41", "4", "Tires and Tubes", "6/1/2002 12:00:00 AM", "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"}); - table307.AddRow(new string[] { + table408.AddRow(new string[] { "42", "", "Record to Delete", "6/1/2005 12:00:00 AM", "3c17c9ae-e906-48b4-bdd3-000000000001"}); - table307.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)), table307, "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 table308 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table409 = new global::Reqnroll.Table(new string[] { "Name", "ParentProductCategoryId", "Rowguid"}); - table308.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)), table308, "When "); + await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table409, "When "); #line hidden - global::Reqnroll.Table table309 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table410 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table309.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)), table309, "And "); + await testRunner.AndAsync("I call the method \'AddAsync\' with the parameter values", ((string)(null)), table410, "And "); #line hidden - global::Reqnroll.Table table310 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table411 = new global::Reqnroll.Table(new string[] { "Expected"}); - table310.AddRow(new string[] { + table411.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)), table411, "Then "); #line hidden - global::Reqnroll.Table table311 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table412 = new global::Reqnroll.Table(new string[] { "IsFailure", "IsSuccess", "Message"}); - table311.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)), table311, "And "); + await testRunner.AndAsync("the result is", ((string)(null)), table412, "And "); #line hidden - global::Reqnroll.Table table312 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table413 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table312.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)), table312, "And "); + await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table413, "And "); #line hidden - global::Reqnroll.Table table313 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table414 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table313.AddRow(new string[] { + table414.AddRow(new string[] { "41", "4", "Tires and Tubes", "6/1/2002 12:00:00 AM", "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"}); - table313.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)), table313, "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 table314 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table415 = new global::Reqnroll.Table(new string[] { "Name", "ParentProductCategoryId", "Rowguid"}); - table314.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)), table314, "When "); + await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table415, "When "); #line hidden - global::Reqnroll.Table table315 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table416 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table315.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)), table315, "And "); + await testRunner.AndAsync("I call the method \'AddAsync\' with the parameter values", ((string)(null)), table416, "And "); #line hidden - global::Reqnroll.Table table316 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table417 = new global::Reqnroll.Table(new string[] { "Expected"}); - table316.AddRow(new string[] { + table417.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)), table417, "Then "); #line hidden - global::Reqnroll.Table table317 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table418 = new global::Reqnroll.Table(new string[] { "IsFailure", "IsSuccess", "Message"}); - table317.AddRow(new string[] { + table418.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)), table418, "And "); #line hidden - global::Reqnroll.Table table318 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table419 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table318.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)), table318, "And "); + await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table419, "And "); #line hidden - global::Reqnroll.Table table319 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table420 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table319.AddRow(new string[] { + table420.AddRow(new string[] { "41", "4", "Tires and Tubes", "6/1/2002 12:00:00 AM", "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"}); - table319.AddRow(new string[] { + table420.AddRow(new string[] { "42", "", "Record to Delete", "6/1/2005 12:00:00 AM", "3c17c9ae-e906-48b4-bdd3-000000000001"}); - table319.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)), table319, "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 table320 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table421 = new global::Reqnroll.Table(new string[] { "Name", "ParentProductCategoryId", "Rowguid"}); - table320.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)), table320, "When "); + await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table421, "When "); #line hidden - global::Reqnroll.Table table321 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table422 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table321.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)), table321, "And "); + await testRunner.AndAsync("I call the method \'AddAsync\' with the parameter values", ((string)(null)), table422, "And "); #line hidden - global::Reqnroll.Table table322 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table423 = new global::Reqnroll.Table(new string[] { "Expected"}); - table322.AddRow(new string[] { + table423.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)), table423, "Then "); #line hidden - global::Reqnroll.Table table323 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table424 = new global::Reqnroll.Table(new string[] { "IsFailure", "IsSuccess", "Message"}); - table323.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)), table323, "And "); + await testRunner.AndAsync("the result is", ((string)(null)), table424, "And "); #line hidden - global::Reqnroll.Table table324 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table425 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table324.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)), table324, "And "); + await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table425, "And "); #line hidden - global::Reqnroll.Table table325 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table426 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table325.AddRow(new string[] { + table426.AddRow(new string[] { "41", "4", "Tires and Tubes", "6/1/2002 12:00:00 AM", "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"}); - table325.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)), table325, "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 table326 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table427 = new global::Reqnroll.Table(new string[] { "Name", "ParentProductCategoryId", "Rowguid"}); - table326.AddRow(new string[] { + table427.AddRow(new string[] { "How", "4", "00000000-1111-1111-0000-000000000001"}); - table326.AddRow(new string[] { + table427.AddRow(new string[] { "Now", "5", "00000000-1111-1111-0000-000000000002"}); - table326.AddRow(new string[] { + table427.AddRow(new string[] { "Brown", "41", "00000000-1111-1111-0000-000000000003"}); - table326.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)), table326, "When "); + "el\'", ((string)(null)), table427, "When "); #line hidden - global::Reqnroll.Table table327 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table428 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table327.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)), table327, "And "); + await testRunner.AndAsync("I call the method \'AddBatchAsync\' with the parameter values", ((string)(null)), table428, "And "); #line hidden - global::Reqnroll.Table table328 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table429 = new global::Reqnroll.Table(new string[] { "Expected"}); - table328.AddRow(new string[] { + table429.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)), table429, "Then "); #line hidden - global::Reqnroll.Table table329 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table430 = new global::Reqnroll.Table(new string[] { "IsFailure", "IsSuccess", "Message"}); - table329.AddRow(new string[] { + table430.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)), table430, "And "); #line hidden - global::Reqnroll.Table table330 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table431 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table330.AddRow(new string[] { + table431.AddRow(new string[] { "5001", "4", "How", "5/24/2024 12:34:56 PM", "00000000-1111-1111-0000-000000000001"}); - table330.AddRow(new string[] { + table431.AddRow(new string[] { "5002", "5", "Now", "5/24/2024 12:34:56 PM", "00000000-1111-1111-0000-000000000002"}); - table330.AddRow(new string[] { + table431.AddRow(new string[] { "5003", "41", "Brown", "5/24/2024 12:34:56 PM", "00000000-1111-1111-0000-000000000003"}); - table330.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)), table330, "And "); + await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table431, "And "); #line hidden - global::Reqnroll.Table table331 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table432 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table331.AddRow(new string[] { + table432.AddRow(new string[] { "41", "4", "Tires and Tubes", "6/1/2002 12:00:00 AM", "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"}); - table331.AddRow(new string[] { + table432.AddRow(new string[] { "42", "", "Record to Delete", "6/1/2005 12:00:00 AM", "3c17c9ae-e906-48b4-bdd3-000000000001"}); - table331.AddRow(new string[] { + table432.AddRow(new string[] { "5001", "4", "How", "5/24/2024 12:34:56 PM", "00000000-1111-1111-0000-000000000001"}); - table331.AddRow(new string[] { + table432.AddRow(new string[] { "5002", "5", "Now", "5/24/2024 12:34:56 PM", "00000000-1111-1111-0000-000000000002"}); - table331.AddRow(new string[] { + table432.AddRow(new string[] { "5003", "41", "Brown", "5/24/2024 12:34:56 PM", "00000000-1111-1111-0000-000000000003"}); - table331.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)), table331, "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 table332 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table433 = new global::Reqnroll.Table(new string[] { "Name", "ParentProductCategoryId", "Rowguid"}); - table332.AddRow(new string[] { + table433.AddRow(new string[] { "Hi", "4", "00000000-1111-1111-0000-000000000001"}); - table332.AddRow(new string[] { + table433.AddRow(new string[] { "Now", "5", "00000000-1111-1111-0000-000000000002"}); - table332.AddRow(new string[] { + table433.AddRow(new string[] { "Brown", "41", "00000000-1111-1111-0000-000000000003"}); - table332.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)), table332, "When "); + "el\'", ((string)(null)), table433, "When "); #line hidden - global::Reqnroll.Table table333 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table434 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table333.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)), table333, "And "); + await testRunner.AndAsync("I call the method \'AddBatchAsync\' with the parameter values", ((string)(null)), table434, "And "); #line hidden - global::Reqnroll.Table table334 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table435 = new global::Reqnroll.Table(new string[] { "Expected"}); - table334.AddRow(new string[] { + table435.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)), table435, "Then "); #line hidden - global::Reqnroll.Table table335 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table436 = new global::Reqnroll.Table(new string[] { "IsFailure", "IsSuccess"}); - table335.AddRow(new string[] { + table436.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)), table436, "And "); #line hidden - global::Reqnroll.Table table336 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table437 = new global::Reqnroll.Table(new string[] { "Expected"}); - table336.AddRow(new string[] { + table437.AddRow(new string[] { "\'Name\' must be between 3 and 50 characters. You entered 2 characters."}); - table336.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)), table336, "And "); + await testRunner.AndAsync("the results property \'Message\' contains", ((string)(null)), table437, "And "); #line hidden - global::Reqnroll.Table table337 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table438 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table337.AddRow(new string[] { + table438.AddRow(new string[] { "0", "4", "Hi", "1/1/0001 12:00:00 AM", "00000000-1111-1111-0000-000000000001"}); - table337.AddRow(new string[] { + table438.AddRow(new string[] { "0", "5", "Now", "1/1/0001 12:00:00 AM", "00000000-1111-1111-0000-000000000002"}); - table337.AddRow(new string[] { + table438.AddRow(new string[] { "0", "41", "Brown", "1/1/0001 12:00:00 AM", "00000000-1111-1111-0000-000000000003"}); - table337.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)), table337, "And "); + await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table438, "And "); #line hidden - global::Reqnroll.Table table338 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table439 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table338.AddRow(new string[] { + table439.AddRow(new string[] { "41", "4", "Tires and Tubes", "6/1/2002 12:00:00 AM", "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"}); - table338.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)), table338, "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 028357c..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 table339 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table440 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName", "ModifiedDate"}); - table339.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)), table339, "When "); + await testRunner.WhenAsync("I call the method \'DeleteAsync\' with the parameter values", ((string)(null)), table440, "When "); #line hidden - global::Reqnroll.Table table340 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table441 = new global::Reqnroll.Table(new string[] { "Expected"}); - table340.AddRow(new string[] { + table441.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)), table441, "Then "); #line hidden - global::Reqnroll.Table table341 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table442 = new global::Reqnroll.Table(new string[] { "IsFailure", "IsSuccess", "Message"}); - table341.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)), table341, "And "); + await testRunner.AndAsync("the result is", ((string)(null)), table442, "And "); #line hidden - global::Reqnroll.Table table342 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table443 = new global::Reqnroll.Table(new string[] { "Expected"}); - table342.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)), table342, "And "); + await testRunner.AndAsync("the ServiceResult is of type \'System.Boolean\' with the value", ((string)(null)), table443, "And "); #line hidden - global::Reqnroll.Table table343 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table444 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table343.AddRow(new string[] { + table444.AddRow(new string[] { "41", "4", "Tires and Tubes", "6/1/2002 12:00:00 AM", "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"}); - table343.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)), table343, "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 table344 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table445 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table344.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)), table344, "When "); + await testRunner.WhenAsync("I call the method \'DeleteAsync\' with the parameter values", ((string)(null)), table445, "When "); #line hidden - global::Reqnroll.Table table345 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table446 = new global::Reqnroll.Table(new string[] { "Expected"}); - table345.AddRow(new string[] { + table446.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)), table446, "Then "); #line hidden - global::Reqnroll.Table table346 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table447 = new global::Reqnroll.Table(new string[] { "IsFailure", "IsSuccess", "Message"}); - table346.AddRow(new string[] { + table447.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)), table447, "And "); #line hidden - global::Reqnroll.Table table347 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table448 = new global::Reqnroll.Table(new string[] { "Expected"}); - table347.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)), table347, "And "); + await testRunner.AndAsync("the ServiceResult is of type \'System.Boolean\' with the value", ((string)(null)), table448, "And "); #line hidden - global::Reqnroll.Table table348 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table449 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table348.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)), table348, "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 4d3db09..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,79 @@ 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 | - 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 | + 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_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 | @@ -71,9 +130,127 @@ 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 | - 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_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 | Count | Capacity | - | 9 | 42 | 5 | 2 | 5 | 5 | - 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 | Count | Capacity | - | 6 | 42 | 8 | 2 | 8 | 8 | - 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 | Count | Capacity | - | 9 | 42 | 5 | 1234 | 0 | 0 | - 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' @@ -186,11 +365,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 | 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 | + | 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 +387,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 | 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 | + | 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 +429,29 @@ 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 | 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 448f68a..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 table349 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table450 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table349.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)), table349, "When "); + await testRunner.WhenAsync("I call the method \'FindAsync\' with the parameter values", ((string)(null)), table450, "When "); #line hidden - global::Reqnroll.Table table350 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table451 = new global::Reqnroll.Table(new string[] { "Expected"}); - table350.AddRow(new string[] { + table451.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)), table451, "Then "); #line hidden - global::Reqnroll.Table table351 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table452 = new global::Reqnroll.Table(new string[] { "ModifiedDate", "Name", "ParentProductCategoryId", "ProductCategoryId", "Rowguid"}); - table351.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)), table351, "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 table352 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table453 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table352.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)), table352, "When "); + await testRunner.WhenAsync("I call the method \'FindAsync\' with the parameter values", ((string)(null)), table453, "When "); #line hidden - global::Reqnroll.Table table353 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table454 = new global::Reqnroll.Table(new string[] { "Expected"}); - table353.AddRow(new string[] { + table454.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)), table454, "Then "); #line hidden - global::Reqnroll.Table table354 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table455 = new global::Reqnroll.Table(new string[] { "ModifiedDate", "Name", "ParentProductCategoryId", "ProductCategoryId", "Rowguid"}); - table354.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)), table354, "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 table355 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table456 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table355.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)), table355, "When "); + await testRunner.WhenAsync("I call the method \'FindAsync\' with the parameter values", ((string)(null)), table456, "When "); #line hidden - global::Reqnroll.Table table356 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table457 = new global::Reqnroll.Table(new string[] { "Expected"}); - table356.AddRow(new string[] { + table457.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)), table457, "Then "); #line hidden #line 40 await testRunner.AndAsync("the result is null", ((string)(null)), ((global::Reqnroll.Table)(null)), "And "); @@ -288,103 +288,99 @@ 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 table458 = new global::Reqnroll.Table(new string[] { "PageNumber", "PageSize"}); - table357.AddRow(new string[] { + table458.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)), table458, "When "); #line hidden - global::Reqnroll.Table table358 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table459 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table358.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)), table358, "And "); + await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table459, "And "); #line hidden - global::Reqnroll.Table table359 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table460 = new global::Reqnroll.Table(new string[] { "Expected"}); - table359.AddRow(new string[] { + table460.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)), table460, "Then "); #line hidden - global::Reqnroll.Table table360 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table461 = new global::Reqnroll.Table(new string[] { "TotalPages", "TotalCount", "PageSize", - "CurrentPage", - "Count", - "Capacity"}); - table360.AddRow(new string[] { + "CurrentPage"}); + table461.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)), table461, "And "); #line hidden - global::Reqnroll.Table table361 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table462 = new global::Reqnroll.Table(new string[] { "ModifiedDate", "Name", "ParentProductCategoryId", "ProductCategoryId", "Rowguid"}); - table361.AddRow(new string[] { + table462.AddRow(new string[] { "6/1/2002 12:00:00 AM", - "Accessories", - "", - "4", - "2be3be36-d9a2-4eee-b593-ed895d97c2a6"}); - table361.AddRow(new string[] { + "Road Bikes", + "1", + "6", + "000310c0-bcc8-42c4-b0c3-45ae611af06b"}); + table462.AddRow(new string[] { "6/1/2002 12:00:00 AM", - "Bikes", - "", + "Touring Bikes", "1", - "cfbda25c-df71-47a7-b81b-64ee161aa37c"}); - table361.AddRow(new string[] { + "7", + "02c5061d-ecdc-4274-b5f1-e91d76bc3f37"}); + table462.AddRow(new string[] { "6/1/2002 12:00:00 AM", - "Components", - "", + "Handlebars", "2", - "c657828d-d808-4aba-91a3-af2ce02300e9"}); - table361.AddRow(new string[] { + "8", + "3ef2c725-7135-4c85-9ae6-ae9a3bdd9283"}); + table462.AddRow(new string[] { "6/1/2002 12:00:00 AM", - "Clothing", - "", - "3", - "10a7c342-ca82-48d4-8a38-46a2eb089b74"}); - table361.AddRow(new string[] { + "Bottom Brackets", + "2", + "9", + "a9e54089-8a1e-4cf5-8646-e3801f685934"}); + table462.AddRow(new string[] { "6/1/2002 12:00:00 AM", - "Mountain Bikes", - "1", - "5", - "2d364ade-264a-433c-b092-4fcbf3804e01"}); + "Brakes", + "2", + "10", + "d43ba4a3-ef0d-426b-90eb-4be4547dd30c"}); #line 55 - await testRunner.AndAsync("the results are", ((string)(null)), table361, "And "); + 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_1_500")] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("FindAllAsync_0_500")] [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() { 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", null, tagsOfScenario, argumentsOfScenario, featureTags); +#line 64 this.ScenarioInitialize(scenarioInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -397,325 +393,321 @@ 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 table463 = new global::Reqnroll.Table(new string[] { "PageNumber", "PageSize"}); - table362.AddRow(new string[] { - "1", + table463.AddRow(new string[] { + "0", "500"}); -#line 64 - await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table362, "When "); +#line 65 + await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table463, "When "); #line hidden - global::Reqnroll.Table table363 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table464 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table363.AddRow(new string[] { + table464.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 "); +#line 68 + await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table464, "And "); #line hidden - global::Reqnroll.Table table364 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table465 = new global::Reqnroll.Table(new string[] { "Expected"}); - table364.AddRow(new string[] { + table465.AddRow(new string[] { "AdventureWorksDemo.Data.Paging.PagedList"}); -#line 70 - await testRunner.ThenAsync("the result is of type", ((string)(null)), table364, "Then "); +#line 71 + await testRunner.ThenAsync("the result is of type", ((string)(null)), table465, "Then "); #line hidden - global::Reqnroll.Table table365 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table466 = new global::Reqnroll.Table(new string[] { "TotalPages", "TotalCount", "PageSize", - "CurrentPage", - "Count", - "Capacity"}); - table365.AddRow(new string[] { + "CurrentPage"}); + table466.AddRow(new string[] { "1", "42", "100", - "1", - "42", - "42"}); -#line 73 - await testRunner.AndAsync("the PagedList values are", ((string)(null)), table365, "And "); + "0"}); +#line 74 + await testRunner.AndAsync("the PagedList values are", ((string)(null)), table466, "And "); #line hidden - global::Reqnroll.Table table366 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table467 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "1", "", "Bikes", "6/1/2002 12:00:00 AM", "cfbda25c-df71-47a7-b81b-64ee161aa37c"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "2", "", "Components", "6/1/2002 12:00:00 AM", "c657828d-d808-4aba-91a3-af2ce02300e9"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "3", "", "Clothing", "6/1/2002 12:00:00 AM", "10a7c342-ca82-48d4-8a38-46a2eb089b74"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "4", "", "Accessories", "6/1/2002 12:00:00 AM", "2be3be36-d9a2-4eee-b593-ed895d97c2a6"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "5", "1", "Mountain Bikes", "6/1/2002 12:00:00 AM", "2d364ade-264a-433c-b092-4fcbf3804e01"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "6", "1", "Road Bikes", "6/1/2002 12:00:00 AM", "000310c0-bcc8-42c4-b0c3-45ae611af06b"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "7", "1", "Touring Bikes", "6/1/2002 12:00:00 AM", "02c5061d-ecdc-4274-b5f1-e91d76bc3f37"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "8", "2", "Handlebars", "6/1/2002 12:00:00 AM", "3ef2c725-7135-4c85-9ae6-ae9a3bdd9283"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "9", "2", "Bottom Brackets", "6/1/2002 12:00:00 AM", "a9e54089-8a1e-4cf5-8646-e3801f685934"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "10", "2", "Brakes", "6/1/2002 12:00:00 AM", "d43ba4a3-ef0d-426b-90eb-4be4547dd30c"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "11", "2", "Chains", "6/1/2002 12:00:00 AM", "e93a7231-f16c-4b0f-8c41-c73fdec62da0"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "12", "2", "Cranksets", "6/1/2002 12:00:00 AM", "4f644521-422b-4f19-974a-e3df6102567e"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "13", "2", "Derailleurs", "6/1/2002 12:00:00 AM", "1830d70c-aa2a-40c0-a271-5ba86f38f8bf"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "14", "2", "Forks", "6/1/2002 12:00:00 AM", "b5f9ba42-b69b-4fdd-b2ec-57fb7b42e3cf"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "15", "2", "Headsets", "6/1/2002 12:00:00 AM", "7c782bbe-5a16-495a-aa50-10afe5a84af2"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "16", "2", "Mountain Frames", "6/1/2002 12:00:00 AM", "61b21b65-e16a-4be7-9300-4d8e9db861be"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "17", "2", "Pedals", "6/1/2002 12:00:00 AM", "6d24ac07-7a84-4849-864a-865a14125bc9"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "18", "2", "Road Frames", "6/1/2002 12:00:00 AM", "5515f857-075b-4f9a-87b7-43b4997077b3"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "19", "2", "Saddles", "6/1/2002 12:00:00 AM", "049fffa3-9d30-46df-82f7-f20730ec02b3"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "20", "2", "Touring Frames", "6/1/2002 12:00:00 AM", "d2e3f1a8-56c4-4f36-b29d-5659fc0d2789"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "21", "2", "Wheels", "6/1/2002 12:00:00 AM", "43521287-4b0b-438e-b80e-d82d9ad7c9f0"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "22", "3", "Bib-Shorts", "6/1/2002 12:00:00 AM", "67b58d2b-5798-4a90-8c6c-5ddacf057171"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "23", "3", "Caps", "6/1/2002 12:00:00 AM", "430dd6a8-a755-4b23-bb05-52520107da5f"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "24", "3", "Gloves", "6/1/2002 12:00:00 AM", "92d5657b-0032-4e49-bad5-41a441a70942"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "25", "3", "Jerseys", "6/1/2002 12:00:00 AM", "09e91437-ba4f-4b1a-8215-74184fd95db8"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "26", "3", "Shorts", "6/1/2002 12:00:00 AM", "1a5ba5b3-03c3-457c-b11e-4fa85ede87da"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "27", "3", "Socks", "6/1/2002 12:00:00 AM", "701019c3-09fe-4949-8386-c6ce686474e5"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "28", "3", "Tights", "6/1/2002 12:00:00 AM", "5deb3e55-9897-4416-b18a-515e970bc2d1"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "29", "3", "Vests", "6/1/2002 12:00:00 AM", "9ad7fe93-5ba0-4736-b578-ff80a2071297"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "30", "4", "Bike Racks", "6/1/2002 12:00:00 AM", "4624b5ce-66d6-496b-9201-c053df3556cc"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "31", "4", "Bike Stands", "6/1/2002 12:00:00 AM", "43b445c8-b820-424e-a1d5-90d81da0b46f"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "32", "4", "Bottles and Cages", "6/1/2002 12:00:00 AM", "9b7dff41-9fa3-4776-8def-2c9a48c8b779"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "33", "4", "Cleaners", "6/1/2002 12:00:00 AM", "9ad3bcf0-244d-4ec4-a6a0-fb701351c6a3"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "34", "4", "Fenders", "6/1/2002 12:00:00 AM", "1697f8a2-0a08-4883-b7dd-d19117b4e9a7"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "35", "4", "Helmets", "6/1/2002 12:00:00 AM", "f5e07a33-c9e0-439c-b5f3-9f25fb65becc"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "36", "4", "Hydration Packs", "6/1/2002 12:00:00 AM", "646a8906-fc87-4267-a443-9c6d791e6693"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "37", "4", "Lights", "6/1/2002 12:00:00 AM", "954178ba-624f-42db-95f6-ca035f36d130"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "38", "4", "Locks", "6/1/2002 12:00:00 AM", "19646983-3fa0-4773-9a0c-f34c49df9bc8"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "39", "4", "Panniers", "6/1/2002 12:00:00 AM", "3002a5d5-fec3-464b-bef3-e0f81d35f431"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "40", "4", "Pumps", "6/1/2002 12:00:00 AM", "fe4d46f2-c87c-48c5-a4a1-3f55712d80b1"}); - table366.AddRow(new string[] { + table467.AddRow(new string[] { "41", "4", "Tires and Tubes", "6/1/2002 12:00:00 AM", "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"}); - table366.AddRow(new string[] { + table467.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 "); +#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_2_5")] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("FindAllAsync_0_500_Sort_ProductCategoryId")] [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ProductCategoryServiceFindTests")] - public async System.Threading.Tasks.Task FindAllAsync_2_5() + 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_2_5", null, tagsOfScenario, argumentsOfScenario, featureTags); -#line 120 + 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))) @@ -728,295 +720,1282 @@ 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 table468 = new global::Reqnroll.Table(new string[] { "PageNumber", - "PageSize"}); - table367.AddRow(new string[] { - "2", - "5"}); -#line 121 - await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table367, "When "); + "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 table368 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table469 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table368.AddRow(new string[] { + table469.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 "); +#line 126 + await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table469, "And "); #line hidden - global::Reqnroll.Table table369 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table470 = new global::Reqnroll.Table(new string[] { "Expected"}); - table369.AddRow(new string[] { + table470.AddRow(new string[] { "AdventureWorksDemo.Data.Paging.PagedList"}); -#line 127 - await testRunner.ThenAsync("the result is of type", ((string)(null)), table369, "Then "); +#line 129 + await testRunner.ThenAsync("the result is of type", ((string)(null)), table470, "Then "); #line hidden - global::Reqnroll.Table table370 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table471 = new global::Reqnroll.Table(new string[] { "TotalPages", "TotalCount", "PageSize", - "CurrentPage", - "Count", - "Capacity"}); - table370.AddRow(new string[] { - "9", + "CurrentPage"}); + table471.AddRow(new string[] { + "1", "42", - "5", - "2", - "5", - "5"}); -#line 130 - await testRunner.AndAsync("the PagedList values are", ((string)(null)), table370, "And "); + "100", + "0"}); +#line 132 + await testRunner.AndAsync("the PagedList values are", ((string)(null)), table471, "And "); #line hidden - global::Reqnroll.Table table371 = new global::Reqnroll.Table(new string[] { - "ModifiedDate", - "Name", - "ParentProductCategoryId", + global::Reqnroll.Table table472 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", + "ParentProductCategoryId", + "Name", + "ModifiedDate", "Rowguid"}); - table371.AddRow(new string[] { + table472.AddRow(new string[] { + "1", + "", + "Bikes", "6/1/2002 12:00:00 AM", - "Road Bikes", + "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", - "6", - "000310c0-bcc8-42c4-b0c3-45ae611af06b"}); - table371.AddRow(new string[] { + "Mountain Bikes", "6/1/2002 12:00:00 AM", - "Touring Bikes", + "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", - "02c5061d-ecdc-4274-b5f1-e91d76bc3f37"}); - table371.AddRow(new string[] { + "1", + "Touring Bikes", "6/1/2002 12:00:00 AM", - "Handlebars", - "2", + "02c5061d-ecdc-4274-b5f1-e91d76bc3f37"}); + table472.AddRow(new string[] { "8", - "3ef2c725-7135-4c85-9ae6-ae9a3bdd9283"}); - table371.AddRow(new string[] { - "6/1/2002 12:00:00 AM", - "Bottom Brackets", "2", - "9", - "a9e54089-8a1e-4cf5-8646-e3801f685934"}); - table371.AddRow(new string[] { + "Handlebars", "6/1/2002 12:00:00 AM", - "Brakes", + "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"}); -#line 133 - await testRunner.AndAsync("the results are", ((string)(null)), table371, "And "); -#line hidden - } - await this.ScenarioCleanupAsync(); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("FindAllAsync_2_8")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ProductCategoryServiceFindTests")] - 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 -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 table372 = new global::Reqnroll.Table(new string[] { - "PageNumber", - "PageSize"}); - table372.AddRow(new string[] { + table472.AddRow(new string[] { + "11", "2", - "8"}); -#line 142 - await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table372, "When "); -#line hidden - global::Reqnroll.Table table373 = new global::Reqnroll.Table(new string[] { - "Key", - "Value", - "TypeName"}); - table373.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 "); -#line hidden - global::Reqnroll.Table table374 = new global::Reqnroll.Table(new string[] { - "Expected"}); - table374.AddRow(new string[] { - "AdventureWorksDemo.Data.Paging.PagedList"}); -#line 148 - await testRunner.ThenAsync("the result is of type", ((string)(null)), table374, "Then "); -#line hidden - global::Reqnroll.Table table375 = new global::Reqnroll.Table(new string[] { - "TotalPages", - "TotalCount", - "PageSize", - "CurrentPage", - "Count", - "Capacity"}); - table375.AddRow(new string[] { - "6", - "42", - "8", + "Chains", + "6/1/2002 12:00:00 AM", + "e93a7231-f16c-4b0f-8c41-c73fdec62da0"}); + table472.AddRow(new string[] { + "12", "2", - "8", - "8"}); -#line 151 - await testRunner.AndAsync("the PagedList values are", ((string)(null)), table375, "And "); -#line hidden - global::Reqnroll.Table table376 = new global::Reqnroll.Table(new string[] { - "ModifiedDate", - "Name", - "ParentProductCategoryId", - "ProductCategoryId", - "Rowguid"}); - table376.AddRow(new string[] { + "Cranksets", "6/1/2002 12:00:00 AM", - "Bottom Brackets", + "4f644521-422b-4f19-974a-e3df6102567e"}); + table472.AddRow(new string[] { + "13", "2", - "9", - "a9e54089-8a1e-4cf5-8646-e3801f685934"}); - table376.AddRow(new string[] { + "Derailleurs", "6/1/2002 12:00:00 AM", - "Brakes", + "1830d70c-aa2a-40c0-a271-5ba86f38f8bf"}); + table472.AddRow(new string[] { + "14", "2", - "10", - "d43ba4a3-ef0d-426b-90eb-4be4547dd30c"}); - table376.AddRow(new string[] { + "Forks", "6/1/2002 12:00:00 AM", - "Chains", + "b5f9ba42-b69b-4fdd-b2ec-57fb7b42e3cf"}); + table472.AddRow(new string[] { + "15", "2", - "11", - "e93a7231-f16c-4b0f-8c41-c73fdec62da0"}); - table376.AddRow(new string[] { + "Headsets", "6/1/2002 12:00:00 AM", - "Cranksets", + "7c782bbe-5a16-495a-aa50-10afe5a84af2"}); + table472.AddRow(new string[] { + "16", "2", - "12", - "4f644521-422b-4f19-974a-e3df6102567e"}); - table376.AddRow(new string[] { + "Mountain Frames", "6/1/2002 12:00:00 AM", - "Derailleurs", + "61b21b65-e16a-4be7-9300-4d8e9db861be"}); + table472.AddRow(new string[] { + "17", "2", - "13", - "1830d70c-aa2a-40c0-a271-5ba86f38f8bf"}); - table376.AddRow(new string[] { + "Pedals", "6/1/2002 12:00:00 AM", - "Forks", + "6d24ac07-7a84-4849-864a-865a14125bc9"}); + table472.AddRow(new string[] { + "18", "2", - "14", - "b5f9ba42-b69b-4fdd-b2ec-57fb7b42e3cf"}); - table376.AddRow(new string[] { + "Road Frames", "6/1/2002 12:00:00 AM", - "Headsets", + "5515f857-075b-4f9a-87b7-43b4997077b3"}); + table472.AddRow(new string[] { + "19", "2", - "15", - "7c782bbe-5a16-495a-aa50-10afe5a84af2"}); - table376.AddRow(new string[] { + "Saddles", "6/1/2002 12:00:00 AM", - "Mountain Frames", + "049fffa3-9d30-46df-82f7-f20730ec02b3"}); + table472.AddRow(new string[] { + "20", "2", - "16", - "61b21b65-e16a-4be7-9300-4d8e9db861be"}); -#line 154 - await testRunner.AndAsync("the results are", ((string)(null)), table376, "And "); -#line hidden - } - await this.ScenarioCleanupAsync(); - } - - [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] - [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("FindAllAsync_1234_5")] - [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ProductCategoryServiceFindTests")] - 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 -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 table377 = new global::Reqnroll.Table(new string[] { - "PageNumber", - "PageSize"}); - table377.AddRow(new string[] { - "1234", - "5"}); -#line 166 - await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table377, "When "); -#line hidden - global::Reqnroll.Table table378 = new global::Reqnroll.Table(new string[] { + "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", + "d43ba4a3-ef0d-426b-90eb-4be4547dd30c"}); + table477.AddRow(new string[] { + "9", + "2", + "Bottom Brackets", + "6/1/2002 12:00:00 AM", + "a9e54089-8a1e-4cf5-8646-e3801f685934"}); + table477.AddRow(new string[] { + "8", + "2", + "Handlebars", + "6/1/2002 12:00:00 AM", + "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"}); + table477.AddRow(new string[] { + "2", + "", + "Components", + "6/1/2002 12:00:00 AM", + "c657828d-d808-4aba-91a3-af2ce02300e9"}); + table477.AddRow(new string[] { + "1", + "", + "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_0_500_Sort_ProductCategoryIdASC")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ProductCategoryServiceFindTests")] + 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_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))) + { + testRunner.SkipScenario(); + } + else + { + await this.ScenarioStartAsync(); +#line 7 +await this.FeatureBackgroundAsync(); +#line hidden + global::Reqnroll.Table table478 = new global::Reqnroll.Table(new string[] { + "PageNumber", + "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 table479 = new global::Reqnroll.Table(new string[] { + "Key", + "Value", + "TypeName"}); + table479.AddRow(new string[] { + "pageingFilter", + "{{model}}", + "AdventureWorksDemo.Data.Paging.PagingFilter"}); +#line 244 + await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table479, "And "); +#line hidden + global::Reqnroll.Table table480 = new global::Reqnroll.Table(new string[] { + "Expected"}); + table480.AddRow(new string[] { + "AdventureWorksDemo.Data.Paging.PagedList"}); +#line 247 + await testRunner.ThenAsync("the result is of type", ((string)(null)), table480, "Then "); +#line hidden + global::Reqnroll.Table table481 = new global::Reqnroll.Table(new string[] { + "TotalPages", + "TotalCount", + "PageSize", + "CurrentPage"}); + table481.AddRow(new string[] { + "1", + "42", + "100", + "0"}); +#line 250 + await testRunner.AndAsync("the PagedList values are", ((string)(null)), table481, "And "); +#line hidden + global::Reqnroll.Table table482 = new global::Reqnroll.Table(new string[] { + "ProductCategoryId", + "ParentProductCategoryId", + "Name", + "ModifiedDate", + "Rowguid"}); + table482.AddRow(new string[] { + "1", + "", + "Bikes", + "6/1/2002 12:00:00 AM", + "cfbda25c-df71-47a7-b81b-64ee161aa37c"}); + table482.AddRow(new string[] { + "2", + "", + "Components", + "6/1/2002 12:00:00 AM", + "c657828d-d808-4aba-91a3-af2ce02300e9"}); + table482.AddRow(new string[] { + "3", + "", + "Clothing", + "6/1/2002 12:00:00 AM", + "10a7c342-ca82-48d4-8a38-46a2eb089b74"}); + table482.AddRow(new string[] { + "4", + "", + "Accessories", + "6/1/2002 12:00:00 AM", + "2be3be36-d9a2-4eee-b593-ed895d97c2a6"}); + table482.AddRow(new string[] { + "5", + "1", + "Mountain Bikes", + "6/1/2002 12:00:00 AM", + "2d364ade-264a-433c-b092-4fcbf3804e01"}); + table482.AddRow(new string[] { + "6", + "1", + "Road Bikes", + "6/1/2002 12:00:00 AM", + "000310c0-bcc8-42c4-b0c3-45ae611af06b"}); + table482.AddRow(new string[] { + "7", + "1", + "Touring Bikes", + "6/1/2002 12:00:00 AM", + "02c5061d-ecdc-4274-b5f1-e91d76bc3f37"}); + table482.AddRow(new string[] { + "8", + "2", + "Handlebars", + "6/1/2002 12:00:00 AM", + "3ef2c725-7135-4c85-9ae6-ae9a3bdd9283"}); + table482.AddRow(new string[] { + "9", + "2", + "Bottom Brackets", + "6/1/2002 12:00:00 AM", + "a9e54089-8a1e-4cf5-8646-e3801f685934"}); + table482.AddRow(new string[] { + "10", + "2", + "Brakes", + "6/1/2002 12:00:00 AM", + "d43ba4a3-ef0d-426b-90eb-4be4547dd30c"}); + table482.AddRow(new string[] { + "11", + "2", + "Chains", + "6/1/2002 12:00:00 AM", + "e93a7231-f16c-4b0f-8c41-c73fdec62da0"}); + table482.AddRow(new string[] { + "12", + "2", + "Cranksets", + "6/1/2002 12:00:00 AM", + "4f644521-422b-4f19-974a-e3df6102567e"}); + table482.AddRow(new string[] { + "13", + "2", + "Derailleurs", + "6/1/2002 12:00:00 AM", + "1830d70c-aa2a-40c0-a271-5ba86f38f8bf"}); + table482.AddRow(new string[] { + "14", + "2", + "Forks", + "6/1/2002 12:00:00 AM", + "b5f9ba42-b69b-4fdd-b2ec-57fb7b42e3cf"}); + table482.AddRow(new string[] { + "15", + "2", + "Headsets", + "6/1/2002 12:00:00 AM", + "7c782bbe-5a16-495a-aa50-10afe5a84af2"}); + table482.AddRow(new string[] { + "16", + "2", + "Mountain Frames", + "6/1/2002 12:00:00 AM", + "61b21b65-e16a-4be7-9300-4d8e9db861be"}); + table482.AddRow(new string[] { + "17", + "2", + "Pedals", + "6/1/2002 12:00:00 AM", + "6d24ac07-7a84-4849-864a-865a14125bc9"}); + table482.AddRow(new string[] { + "18", + "2", + "Road Frames", + "6/1/2002 12:00:00 AM", + "5515f857-075b-4f9a-87b7-43b4997077b3"}); + table482.AddRow(new string[] { + "19", + "2", + "Saddles", + "6/1/2002 12:00:00 AM", + "049fffa3-9d30-46df-82f7-f20730ec02b3"}); + table482.AddRow(new string[] { + "20", + "2", + "Touring Frames", + "6/1/2002 12:00:00 AM", + "d2e3f1a8-56c4-4f36-b29d-5659fc0d2789"}); + table482.AddRow(new string[] { + "21", + "2", + "Wheels", + "6/1/2002 12:00:00 AM", + "43521287-4b0b-438e-b80e-d82d9ad7c9f0"}); + table482.AddRow(new string[] { + "22", + "3", + "Bib-Shorts", + "6/1/2002 12:00:00 AM", + "67b58d2b-5798-4a90-8c6c-5ddacf057171"}); + table482.AddRow(new string[] { + "23", + "3", + "Caps", + "6/1/2002 12:00:00 AM", + "430dd6a8-a755-4b23-bb05-52520107da5f"}); + table482.AddRow(new string[] { + "24", + "3", + "Gloves", + "6/1/2002 12:00:00 AM", + "92d5657b-0032-4e49-bad5-41a441a70942"}); + table482.AddRow(new string[] { + "25", + "3", + "Jerseys", + "6/1/2002 12:00:00 AM", + "09e91437-ba4f-4b1a-8215-74184fd95db8"}); + table482.AddRow(new string[] { + "26", + "3", + "Shorts", + "6/1/2002 12:00:00 AM", + "1a5ba5b3-03c3-457c-b11e-4fa85ede87da"}); + table482.AddRow(new string[] { + "27", + "3", + "Socks", + "6/1/2002 12:00:00 AM", + "701019c3-09fe-4949-8386-c6ce686474e5"}); + table482.AddRow(new string[] { + "28", + "3", + "Tights", + "6/1/2002 12:00:00 AM", + "5deb3e55-9897-4416-b18a-515e970bc2d1"}); + table482.AddRow(new string[] { + "29", + "3", + "Vests", + "6/1/2002 12:00:00 AM", + "9ad7fe93-5ba0-4736-b578-ff80a2071297"}); + table482.AddRow(new string[] { + "30", + "4", + "Bike Racks", + "6/1/2002 12:00:00 AM", + "4624b5ce-66d6-496b-9201-c053df3556cc"}); + table482.AddRow(new string[] { + "31", + "4", + "Bike Stands", + "6/1/2002 12:00:00 AM", + "43b445c8-b820-424e-a1d5-90d81da0b46f"}); + table482.AddRow(new string[] { + "32", + "4", + "Bottles and Cages", + "6/1/2002 12:00:00 AM", + "9b7dff41-9fa3-4776-8def-2c9a48c8b779"}); + table482.AddRow(new string[] { + "33", + "4", + "Cleaners", + "6/1/2002 12:00:00 AM", + "9ad3bcf0-244d-4ec4-a6a0-fb701351c6a3"}); + table482.AddRow(new string[] { + "34", + "4", + "Fenders", + "6/1/2002 12:00:00 AM", + "1697f8a2-0a08-4883-b7dd-d19117b4e9a7"}); + table482.AddRow(new string[] { + "35", + "4", + "Helmets", + "6/1/2002 12:00:00 AM", + "f5e07a33-c9e0-439c-b5f3-9f25fb65becc"}); + table482.AddRow(new string[] { + "36", + "4", + "Hydration Packs", + "6/1/2002 12:00:00 AM", + "646a8906-fc87-4267-a443-9c6d791e6693"}); + table482.AddRow(new string[] { + "37", + "4", + "Lights", + "6/1/2002 12:00:00 AM", + "954178ba-624f-42db-95f6-ca035f36d130"}); + table482.AddRow(new string[] { + "38", + "4", + "Locks", + "6/1/2002 12:00:00 AM", + "19646983-3fa0-4773-9a0c-f34c49df9bc8"}); + table482.AddRow(new string[] { + "39", + "4", + "Panniers", + "6/1/2002 12:00:00 AM", + "3002a5d5-fec3-464b-bef3-e0f81d35f431"}); + table482.AddRow(new string[] { + "40", + "4", + "Pumps", + "6/1/2002 12:00:00 AM", + "fe4d46f2-c87c-48c5-a4a1-3f55712d80b1"}); + table482.AddRow(new string[] { + "41", + "4", + "Tires and Tubes", + "6/1/2002 12:00:00 AM", + "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"}); + table482.AddRow(new string[] { + "42", + "", + "Record to Delete", + "6/1/2005 12:00:00 AM", + "3c17c9ae-e906-48b4-bdd3-000000000001"}); +#line 253 + await testRunner.AndAsync("the sorted results are", ((string)(null)), table482, "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("FindAllAsync_2_5")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ProductCategoryServiceFindTests")] + 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 297 +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 table483 = new global::Reqnroll.Table(new string[] { + "PageNumber", + "PageSize"}); + table483.AddRow(new string[] { + "2", + "5"}); +#line 298 + await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table483, "When "); +#line hidden + global::Reqnroll.Table table484 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table378.AddRow(new string[] { + table484.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 "); +#line 301 + await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table484, "And "); #line hidden - global::Reqnroll.Table table379 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table485 = new global::Reqnroll.Table(new string[] { "Expected"}); - table379.AddRow(new string[] { + table485.AddRow(new string[] { "AdventureWorksDemo.Data.Paging.PagedList"}); -#line 172 - await testRunner.ThenAsync("the result is of type", ((string)(null)), table379, "Then "); +#line 304 + await testRunner.ThenAsync("the result is of type", ((string)(null)), table485, "Then "); #line hidden - global::Reqnroll.Table table380 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table486 = new global::Reqnroll.Table(new string[] { "TotalPages", "TotalCount", "PageSize", - "CurrentPage", - "Count", - "Capacity"}); - table380.AddRow(new string[] { + "CurrentPage"}); + table486.AddRow(new string[] { "9", "42", "5", + "2"}); +#line 307 + await testRunner.AndAsync("the PagedList values are", ((string)(null)), table486, "And "); +#line hidden + global::Reqnroll.Table table487 = new global::Reqnroll.Table(new string[] { + "ModifiedDate", + "Name", + "ParentProductCategoryId", + "ProductCategoryId", + "Rowguid"}); + table487.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Chains", + "2", + "11", + "e93a7231-f16c-4b0f-8c41-c73fdec62da0"}); + table487.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Cranksets", + "2", + "12", + "4f644521-422b-4f19-974a-e3df6102567e"}); + table487.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Derailleurs", + "2", + "13", + "1830d70c-aa2a-40c0-a271-5ba86f38f8bf"}); + table487.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Forks", + "2", + "14", + "b5f9ba42-b69b-4fdd-b2ec-57fb7b42e3cf"}); + table487.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Headsets", + "2", + "15", + "7c782bbe-5a16-495a-aa50-10afe5a84af2"}); +#line 310 + await testRunner.AndAsync("the sorted results are", ((string)(null)), table487, "And "); +#line hidden + } + await this.ScenarioCleanupAsync(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("FindAllAsync_2_8")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ProductCategoryServiceFindTests")] + 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 318 +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 table488 = new global::Reqnroll.Table(new string[] { + "PageNumber", + "PageSize"}); + table488.AddRow(new string[] { + "2", + "8"}); +#line 319 + await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table488, "When "); +#line hidden + global::Reqnroll.Table table489 = new global::Reqnroll.Table(new string[] { + "Key", + "Value", + "TypeName"}); + table489.AddRow(new string[] { + "pageingFilter", + "{{model}}", + "AdventureWorksDemo.Data.Paging.PagingFilter"}); +#line 322 + await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table489, "And "); +#line hidden + global::Reqnroll.Table table490 = new global::Reqnroll.Table(new string[] { + "Expected"}); + table490.AddRow(new string[] { + "AdventureWorksDemo.Data.Paging.PagedList"}); +#line 325 + await testRunner.ThenAsync("the result is of type", ((string)(null)), table490, "Then "); +#line hidden + global::Reqnroll.Table table491 = new global::Reqnroll.Table(new string[] { + "TotalPages", + "TotalCount", + "PageSize", + "CurrentPage"}); + table491.AddRow(new string[] { + "6", + "42", + "8", + "2"}); +#line 328 + await testRunner.AndAsync("the PagedList values are", ((string)(null)), table491, "And "); +#line hidden + global::Reqnroll.Table table492 = new global::Reqnroll.Table(new string[] { + "ModifiedDate", + "Name", + "ParentProductCategoryId", + "ProductCategoryId", + "Rowguid"}); + table492.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Pedals", + "2", + "17", + "6d24ac07-7a84-4849-864a-865a14125bc9"}); + table492.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Road Frames", + "2", + "18", + "5515f857-075b-4f9a-87b7-43b4997077b3"}); + table492.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Saddles", + "2", + "19", + "049fffa3-9d30-46df-82f7-f20730ec02b3"}); + table492.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Touring Frames", + "2", + "20", + "d2e3f1a8-56c4-4f36-b29d-5659fc0d2789"}); + table492.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Wheels", + "2", + "21", + "43521287-4b0b-438e-b80e-d82d9ad7c9f0"}); + table492.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Bib-Shorts", + "3", + "22", + "67b58d2b-5798-4a90-8c6c-5ddacf057171"}); + table492.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Caps", + "3", + "23", + "430dd6a8-a755-4b23-bb05-52520107da5f"}); + table492.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "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(); + } + + [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute()] + [Microsoft.VisualStudio.TestTools.UnitTesting.DescriptionAttribute("FindAllAsync_1234_5")] + [Microsoft.VisualStudio.TestTools.UnitTesting.TestPropertyAttribute("FeatureTitle", "ProductCategoryServiceFindTests")] + 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 342 +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 table493 = new global::Reqnroll.Table(new string[] { + "PageNumber", + "PageSize"}); + table493.AddRow(new string[] { "1234", - "0", - "0"}); -#line 175 - await testRunner.AndAsync("the PagedList values are", ((string)(null)), table380, "And "); + "5"}); +#line 343 + await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table493, "When "); +#line hidden + global::Reqnroll.Table table494 = new global::Reqnroll.Table(new string[] { + "Key", + "Value", + "TypeName"}); + table494.AddRow(new string[] { + "pageingFilter", + "{{model}}", + "AdventureWorksDemo.Data.Paging.PagingFilter"}); +#line 346 + await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table494, "And "); +#line hidden + global::Reqnroll.Table table495 = new global::Reqnroll.Table(new string[] { + "Expected"}); + table495.AddRow(new string[] { + "AdventureWorksDemo.Data.Paging.PagedList"}); +#line 349 + await testRunner.ThenAsync("the result is of type", ((string)(null)), table495, "Then "); +#line hidden + global::Reqnroll.Table table496 = new global::Reqnroll.Table(new string[] { + "TotalPages", + "TotalCount", + "PageSize", + "CurrentPage"}); + table496.AddRow(new string[] { + "9", + "42", + "5", + "8"}); +#line 352 + await testRunner.AndAsync("the PagedList values are", ((string)(null)), table496, "And "); #line hidden - global::Reqnroll.Table table381 = 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)), table381, "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(); @@ -1030,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))) @@ -1043,39 +2022,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 table498 = new global::Reqnroll.Table(new string[] { "PageNumber", "PageSize"}); - table382.AddRow(new string[] { + table498.AddRow(new string[] { "0", "5"}); -#line 182 - await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table382, "When "); +#line 361 + await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table498, "When "); #line hidden - global::Reqnroll.Table table383 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table499 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table383.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)), table383, "And "); +#line 364 + await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table499, "And "); #line hidden - global::Reqnroll.Table table384 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table500 = new global::Reqnroll.Table(new string[] { "Expected"}); - table384.AddRow(new string[] { - "System.ArgumentOutOfRangeException"}); -#line 188 - await testRunner.ThenAsync("the result is of type", ((string)(null)), table384, "Then "); + table500.AddRow(new string[] { + "AdventureWorksDemo.Data.Paging.PagedList"}); +#line 367 + await testRunner.ThenAsync("the result is of type", ((string)(null)), table500, "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 table501 = new global::Reqnroll.Table(new string[] { + "TotalPages", + "TotalCount", + "PageSize", + "CurrentPage"}); + table501.AddRow(new string[] { + "9", + "42", + "5", + "0"}); +#line 371 + await testRunner.AndAsync("the PagedList values are", ((string)(null)), table501, "And "); +#line hidden + global::Reqnroll.Table table502 = new global::Reqnroll.Table(new string[] { + "ModifiedDate", + "Name", + "ParentProductCategoryId", + "ProductCategoryId", + "Rowguid"}); + table502.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Bikes", + "", + "1", + "cfbda25c-df71-47a7-b81b-64ee161aa37c"}); + table502.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Components", + "", + "2", + "c657828d-d808-4aba-91a3-af2ce02300e9"}); + table502.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Clothing", + "", + "3", + "10a7c342-ca82-48d4-8a38-46a2eb089b74"}); + table502.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Accessories", + "", + "4", + "2be3be36-d9a2-4eee-b593-ed895d97c2a6"}); + table502.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Mountain Bikes", + "1", + "5", + "2d364ade-264a-433c-b092-4fcbf3804e01"}); +#line 374 + await testRunner.AndAsync("the sorted results are", ((string)(null)), table502, "And "); #line hidden } await this.ScenarioCleanupAsync(); @@ -1089,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 195 +#line 382 this.ScenarioInitialize(scenarioInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -1102,39 +2127,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 table503 = new global::Reqnroll.Table(new string[] { "PageNumber", "PageSize"}); - table386.AddRow(new string[] { + table503.AddRow(new string[] { "0", "0"}); -#line 196 - await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table386, "When "); +#line 383 + await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table503, "When "); #line hidden - global::Reqnroll.Table table387 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table504 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table387.AddRow(new string[] { + table504.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 386 + await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table504, "And "); #line hidden - global::Reqnroll.Table table388 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table505 = 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 "); + table505.AddRow(new string[] { + "AdventureWorksDemo.Data.Paging.PagedList"}); +#line 389 + await testRunner.ThenAsync("the result is of type", ((string)(null)), table505, "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 table506 = new global::Reqnroll.Table(new string[] { + "TotalPages", + "TotalCount", + "PageSize", + "CurrentPage"}); + table506.AddRow(new string[] { + "2", + "42", + "25", + "0"}); +#line 393 + await testRunner.AndAsync("the PagedList values are", ((string)(null)), table506, "And "); +#line hidden + global::Reqnroll.Table table507 = new global::Reqnroll.Table(new string[] { + "ModifiedDate", + "Name", + "ParentProductCategoryId", + "ProductCategoryId", + "Rowguid"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Bikes", + "", + "1", + "cfbda25c-df71-47a7-b81b-64ee161aa37c"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Components", + "", + "2", + "c657828d-d808-4aba-91a3-af2ce02300e9"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Clothing", + "", + "3", + "10a7c342-ca82-48d4-8a38-46a2eb089b74"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Accessories", + "", + "4", + "2be3be36-d9a2-4eee-b593-ed895d97c2a6"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Mountain Bikes", + "1", + "5", + "2d364ade-264a-433c-b092-4fcbf3804e01"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Road Bikes", + "1", + "6", + "000310c0-bcc8-42c4-b0c3-45ae611af06b"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Touring Bikes", + "1", + "7", + "02c5061d-ecdc-4274-b5f1-e91d76bc3f37"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Handlebars", + "2", + "8", + "3ef2c725-7135-4c85-9ae6-ae9a3bdd9283"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Bottom Brackets", + "2", + "9", + "a9e54089-8a1e-4cf5-8646-e3801f685934"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Brakes", + "2", + "10", + "d43ba4a3-ef0d-426b-90eb-4be4547dd30c"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Chains", + "2", + "11", + "e93a7231-f16c-4b0f-8c41-c73fdec62da0"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Cranksets", + "2", + "12", + "4f644521-422b-4f19-974a-e3df6102567e"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Derailleurs", + "2", + "13", + "1830d70c-aa2a-40c0-a271-5ba86f38f8bf"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Forks", + "2", + "14", + "b5f9ba42-b69b-4fdd-b2ec-57fb7b42e3cf"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Headsets", + "2", + "15", + "7c782bbe-5a16-495a-aa50-10afe5a84af2"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Mountain Frames", + "2", + "16", + "61b21b65-e16a-4be7-9300-4d8e9db861be"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Pedals", + "2", + "17", + "6d24ac07-7a84-4849-864a-865a14125bc9"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Road Frames", + "2", + "18", + "5515f857-075b-4f9a-87b7-43b4997077b3"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Saddles", + "2", + "19", + "049fffa3-9d30-46df-82f7-f20730ec02b3"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Touring Frames", + "2", + "20", + "d2e3f1a8-56c4-4f36-b29d-5659fc0d2789"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Wheels", + "2", + "21", + "43521287-4b0b-438e-b80e-d82d9ad7c9f0"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Bib-Shorts", + "3", + "22", + "67b58d2b-5798-4a90-8c6c-5ddacf057171"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Caps", + "3", + "23", + "430dd6a8-a755-4b23-bb05-52520107da5f"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Gloves", + "3", + "24", + "92d5657b-0032-4e49-bad5-41a441a70942"}); + table507.AddRow(new string[] { + "6/1/2002 12:00:00 AM", + "Jerseys", + "3", + "25", + "09e91437-ba4f-4b1a-8215-74184fd95db8"}); +#line 396 + await testRunner.AndAsync("the sorted results are", ((string)(null)), table507, "And "); #line hidden } await this.ScenarioCleanupAsync(); @@ -1148,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 209 +#line 424 this.ScenarioInitialize(scenarioInfo); #line hidden if ((global::Reqnroll.TagHelper.ContainsIgnoreTag(scenarioInfo.CombinedTags) || global::Reqnroll.TagHelper.ContainsIgnoreTag(featureTags))) @@ -1161,39 +2352,157 @@ 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 table508 = new global::Reqnroll.Table(new string[] { "PageNumber", "PageSize"}); - table390.AddRow(new string[] { + table508.AddRow(new string[] { "5", "0"}); -#line 210 - await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table390, "When "); +#line 425 + await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Paging.PagingFilter\'", ((string)(null)), table508, "When "); #line hidden - global::Reqnroll.Table table391 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table509 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table391.AddRow(new string[] { + table509.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 428 + await testRunner.AndAsync("I call the method \'FindAllAsync\' with the parameter values", ((string)(null)), table509, "And "); #line hidden - global::Reqnroll.Table table392 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table510 = 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 "); + table510.AddRow(new string[] { + "AdventureWorksDemo.Data.Paging.PagedList"}); +#line 431 + await testRunner.ThenAsync("the result is of type", ((string)(null)), table510, "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 table511 = new global::Reqnroll.Table(new string[] { + "TotalPages", + "TotalCount", + "PageSize", + "CurrentPage"}); + table511.AddRow(new string[] { + "2", + "42", + "25", + "1"}); +#line 435 + await testRunner.AndAsync("the PagedList values are", ((string)(null)), table511, "And "); +#line hidden + global::Reqnroll.Table table512 = new global::Reqnroll.Table(new string[] { + "ModifiedDate", + "Name", + "ParentProductCategoryId", + "ProductCategoryId", + "Rowguid"}); + 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 88ea1e0..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 table407 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table526 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table407.AddRow(new string[] { + table526.AddRow(new string[] { "41", "4", "Tires and Tubes", "6/1/2002 12:00:00 AM", "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"}); - table407.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)), table407, "Given "); + "", ((string)(null)), table526, "Given "); #line hidden - global::Reqnroll.Table table408 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table527 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "Name", "ParentProductCategoryId"}); - table408.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)), table408, "When "); + await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table527, "When "); #line hidden - global::Reqnroll.Table table409 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table528 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table409.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)), table409, "And "); + await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table528, "And "); #line hidden - global::Reqnroll.Table table410 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table529 = new global::Reqnroll.Table(new string[] { "Expected"}); - table410.AddRow(new string[] { + table529.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)), table529, "Then "); #line hidden - global::Reqnroll.Table table411 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table530 = new global::Reqnroll.Table(new string[] { "IsFailure", "IsSuccess", "Message"}); - table411.AddRow(new string[] { + table530.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)), table530, "And "); #line hidden - global::Reqnroll.Table table412 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table531 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table412.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)), table412, "And "); + await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table531, "And "); #line hidden - global::Reqnroll.Table table413 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table532 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table413.AddRow(new string[] { + table532.AddRow(new string[] { "41", "", "Ping Pong", "5/24/2024 12:34:56 PM", "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"}); - table413.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)), table413, "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 table414 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table533 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table414.AddRow(new string[] { + table533.AddRow(new string[] { "41", "4", "Tires and Tubes", "6/1/2002 12:00:00 AM", "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"}); - table414.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)), table414, "Given "); + "", ((string)(null)), table533, "Given "); #line hidden - global::Reqnroll.Table table415 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table534 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "Name", "ParentProductCategoryId"}); - table415.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)), table415, "When "); + await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table534, "When "); #line hidden - global::Reqnroll.Table table416 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table535 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table416.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)), table416, "And "); + await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table535, "And "); #line hidden - global::Reqnroll.Table table417 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table536 = new global::Reqnroll.Table(new string[] { "Expected"}); - table417.AddRow(new string[] { + table536.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)), table536, "Then "); #line hidden - global::Reqnroll.Table table418 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table537 = new global::Reqnroll.Table(new string[] { "IsFailure", "IsSuccess", "Message"}); - table418.AddRow(new string[] { + table537.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)), table537, "And "); #line hidden - global::Reqnroll.Table table419 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table538 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table419.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)), table419, "And "); + await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table538, "And "); #line hidden - global::Reqnroll.Table table420 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table539 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table420.AddRow(new string[] { + table539.AddRow(new string[] { "41", "42", "Ping Pong", "5/24/2024 12:34:56 PM", "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"}); - table420.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)), table420, "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 table421 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table540 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table421.AddRow(new string[] { + table540.AddRow(new string[] { "41", "4", "Tires and Tubes", "6/1/2002 12:00:00 AM", "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"}); - table421.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)), table421, "Given "); + "", ((string)(null)), table540, "Given "); #line hidden - global::Reqnroll.Table table422 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table541 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "Name", "ParentProductCategoryId"}); - table422.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)), table422, "When "); + await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table541, "When "); #line hidden - global::Reqnroll.Table table423 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table542 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table423.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)), table423, "And "); + await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table542, "And "); #line hidden - global::Reqnroll.Table table424 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table543 = new global::Reqnroll.Table(new string[] { "Expected"}); - table424.AddRow(new string[] { + table543.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)), table543, "Then "); #line hidden - global::Reqnroll.Table table425 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table544 = new global::Reqnroll.Table(new string[] { "IsFailure", "IsSuccess", "Message"}); - table425.AddRow(new string[] { + table544.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)), table544, "And "); #line hidden - global::Reqnroll.Table table426 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table545 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table426.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)), table426, "And "); + await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table545, "And "); #line hidden - global::Reqnroll.Table table427 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table546 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table427.AddRow(new string[] { + table546.AddRow(new string[] { "41", "42", "Tires and Tubes", "5/24/2024 12:34:56 PM", "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"}); - table427.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)), table427, "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 table428 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table547 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table428.AddRow(new string[] { + table547.AddRow(new string[] { "41", "4", "Tires and Tubes", "6/1/2002 12:00:00 AM", "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"}); - table428.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)), table428, "Given "); + "", ((string)(null)), table547, "Given "); #line hidden - global::Reqnroll.Table table429 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table548 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "Name", "ParentProductCategoryId"}); - table429.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)), table429, "When "); + await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table548, "When "); #line hidden - global::Reqnroll.Table table430 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table549 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table430.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)), table430, "And "); + await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table549, "And "); #line hidden - global::Reqnroll.Table table431 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table550 = new global::Reqnroll.Table(new string[] { "Expected"}); - table431.AddRow(new string[] { + table550.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)), table550, "Then "); #line hidden - global::Reqnroll.Table table432 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table551 = new global::Reqnroll.Table(new string[] { "IsFailure", "IsSuccess"}); - table432.AddRow(new string[] { + table551.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)), table551, "And "); #line hidden - global::Reqnroll.Table table433 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table552 = new global::Reqnroll.Table(new string[] { "Expected"}); - table433.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)), table433, "And "); + await testRunner.AndAsync("the results property \'Message\' contains", ((string)(null)), table552, "And "); #line hidden - global::Reqnroll.Table table434 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table553 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table434.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)), table434, "And "); + await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table553, "And "); #line hidden - global::Reqnroll.Table table435 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table554 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table435.AddRow(new string[] { + table554.AddRow(new string[] { "41", "4", "Tires and Tubes", "6/1/2002 12:00:00 AM", "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"}); - table435.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)), table435, "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 table436 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table555 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name"}); - table436.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)), table436, "When "); + await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table555, "When "); #line hidden - global::Reqnroll.Table table437 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table556 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table437.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)), table437, "And "); + await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table556, "And "); #line hidden - global::Reqnroll.Table table438 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table557 = new global::Reqnroll.Table(new string[] { "Expected"}); - table438.AddRow(new string[] { + table557.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)), table557, "Then "); #line hidden - global::Reqnroll.Table table439 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table558 = new global::Reqnroll.Table(new string[] { "IsFailure", "IsSuccess", "Message"}); - table439.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)), table439, "And "); + await testRunner.AndAsync("the result is", ((string)(null)), table558, "And "); #line hidden - global::Reqnroll.Table table440 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table559 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table440.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)), table440, "And "); + await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table559, "And "); #line hidden - global::Reqnroll.Table table441 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table560 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table441.AddRow(new string[] { + table560.AddRow(new string[] { "41", "4", "Tires and Tubes", "6/1/2002 12:00:00 AM", "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"}); - table441.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)), table441, "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 table442 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table561 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name"}); - table442.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)), table442, "When "); + await testRunner.WhenAsync("I populate the model \'AdventureWorksDemo.Data.Models.ProductCategoryModel\'", ((string)(null)), table561, "When "); #line hidden - global::Reqnroll.Table table443 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table562 = new global::Reqnroll.Table(new string[] { "Key", "Value", "TypeName"}); - table443.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)), table443, "And "); + await testRunner.AndAsync("I call the method \'UpdateAsync\' with the parameter values", ((string)(null)), table562, "And "); #line hidden - global::Reqnroll.Table table444 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table563 = new global::Reqnroll.Table(new string[] { "Expected"}); - table444.AddRow(new string[] { + table563.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)), table563, "Then "); #line hidden - global::Reqnroll.Table table445 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table564 = new global::Reqnroll.Table(new string[] { "IsFailure", "IsSuccess", "Message"}); - table445.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)), table445, "And "); + await testRunner.AndAsync("the result is", ((string)(null)), table564, "And "); #line hidden - global::Reqnroll.Table table446 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table565 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table446.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)), table446, "And "); + await testRunner.AndAsync("the results property \'Value\' contains", ((string)(null)), table565, "And "); #line hidden - global::Reqnroll.Table table447 = new global::Reqnroll.Table(new string[] { + global::Reqnroll.Table table566 = new global::Reqnroll.Table(new string[] { "ProductCategoryId", "ParentProductCategoryId", "Name", "ModifiedDate", "Rowguid"}); - table447.AddRow(new string[] { + table566.AddRow(new string[] { "41", "4", "Tires and Tubes", "6/1/2002 12:00:00 AM", "3c17c9ae-e906-48b4-bdd3-60e28d47dcdf"}); - table447.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)), table447, "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 a7c18d8..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) { @@ -63,7 +69,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")] @@ -146,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")] @@ -185,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 @@ -193,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) { @@ -224,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) { @@ -237,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); } @@ -255,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/AdventureWorksDemo.Data.Tests.csproj b/src/API/AdventureWorksDemo.Data.Tests/AdventureWorksDemo.Data.Tests.csproj new file mode 100644 index 0000000..97116e7 --- /dev/null +++ b/src/API/AdventureWorksDemo.Data.Tests/AdventureWorksDemo.Data.Tests.csproj @@ -0,0 +1,48 @@ + + + + net9.0 + latest + enable + enable + true + + + + true + + + + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + diff --git a/src/API/AdventureWorksDemo.Data.Tests/Extentions/QueryExtensionsApplyFilterTests.cs b/src/API/AdventureWorksDemo.Data.Tests/Extentions/QueryExtensionsApplyFilterTests.cs new file mode 100644 index 0000000..86b0c4b --- /dev/null +++ b/src/API/AdventureWorksDemo.Data.Tests/Extentions/QueryExtensionsApplyFilterTests.cs @@ -0,0 +1,71 @@ +using AdventureWorksDemo.Data.Extentions; +using AdventureWorksDemo.Data.Paging; + +namespace AdventureWorksDemo.Data.Tests.Extentions +{ + [TestClass] + public class QueryExtensionsApplyFilterTests + { + private IQueryable? _testData; + + [TestInitialize] + public void Setup() + { + _testData = new List + { + new() { Id = 1, Name = "Alice", Age = 25 }, + new() { Id = 2, Name = "Bob", Age = 30 }, + new() { Id = 3, Name = "Charlie", Age = 35 } + }.AsQueryable(); + } + + [TestMethod] + public void ApplyFiltersShouldFilterByEquals() + { + var filter = new PageingFilter { Filter = ["Age | Equals | 30"] }; + var result = _testData!.ApplyFilters(filter); + Assert.IsNotNull(result); + Assert.AreEqual(1, result.Count()); + Assert.AreEqual("Bob", result.First().Name); + } + + [TestMethod] + public void ApplyFiltersShouldFilterByGreaterThan() + { + var filter = new PageingFilter { Filter = ["Age | GreaterThan | 25"] }; + var result = _testData!.ApplyFilters(filter); + Assert.IsNotNull(result); + Assert.AreEqual(2, result.Count()); + } + + [TestMethod] + public void ApplyFiltersShouldFilterByContains() + { + var filter = new PageingFilter { Filter = ["Name | Contains | Bob"] }; + var result = _testData!.ApplyFilters(filter); + Assert.IsNotNull(result); + Assert.AreEqual(1, result.Count()); + Assert.AreEqual("Bob", result.First().Name); + } + + [TestMethod] + public void ApplyFiltersShouldThrowExceptionForInvalidFilterFormat() + { + var filter = new PageingFilter { Filter = ["InvalidFormat"] }; + Assert.ThrowsException(() => _testData!.ApplyFilters(filter)); + } + + [TestMethod] + public void ApplyFiltersShouldThrowExceptionForInvalidExpression() + { + var filter = new PageingFilter { Filter = ["Age | InvalidOp | 30"] }; + Assert.ThrowsException(() => _testData!.ApplyFilters(filter)); + } + public class TestEntityApplyFilter + { + public int Id { get; set; } + public string? Name { get; set; } + public int Age { get; set; } + } + } +} \ No newline at end of file diff --git a/src/API/AdventureWorksDemo.Data.Tests/Extentions/QueryExtensionsApplyPagingTests.cs b/src/API/AdventureWorksDemo.Data.Tests/Extentions/QueryExtensionsApplyPagingTests.cs new file mode 100644 index 0000000..69121b8 --- /dev/null +++ b/src/API/AdventureWorksDemo.Data.Tests/Extentions/QueryExtensionsApplyPagingTests.cs @@ -0,0 +1,82 @@ +using AdventureWorksDemo.Data.Extentions; +using AdventureWorksDemo.Data.Paging; + +namespace AdventureWorksDemo.Data.Tests.Extentions +{ + [TestClass] + public class QueryExtensionsApplyPagingTests + { + private readonly List _data = ["A1", "A2", "A3", "A4", "A5", "B1", "B2", "B3", "B4", "B5", "C1", "C2", "C3", "C4", "C5"]; + + + [TestMethod] + public void ApplySlice_NegativePageSize_ReturnsOriginalQuery() + { + // Arrange + var query = _data.AsQueryable(); + var filterNegativePageSize = new PageingFilter() { PageNumber = 0, PageSize = -2 }; + // Act + var result = query.ApplyPageing(filterNegativePageSize); + + // Assert + CollectionAssert.AreEqual(_data, result!.ToList()); + } + + [TestMethod] + public void ApplySlice_NegativeSkip_ReturnsOriginalQuery() + { + // Arrange + var query = _data.AsQueryable(); + var filterNegativeSkip = new PageingFilter() { PageNumber = -1, PageSize = 2 }; + // Act + var result = query.ApplyPageing(filterNegativeSkip); + + // Assert + CollectionAssert.AreEqual(_data[0..2], 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.ApplyPageing(filter); + + // Assert + CollectionAssert.AreEqual(_data[15..15], result!.ToList()); + } + + [TestMethod] + public void ApplySlice_SkipBeyondCount_ReturnsEmpty() + { + // Arrange + var query = _data.AsQueryable(); + var filter = new PageingFilter() { PageNumber = 20, PageSize = 2 }; + + // Act + 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(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.ApplyPageing(filter)!.ToList(); + + // Assert + 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.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/Pageing/PagingFilterTests.cs b/src/API/AdventureWorksDemo.Data.Tests/Pageing/PagingFilterTests.cs new file mode 100644 index 0000000..847699e --- /dev/null +++ b/src/API/AdventureWorksDemo.Data.Tests/Pageing/PagingFilterTests.cs @@ -0,0 +1,67 @@ +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(0, 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 Sanitise_ResetsInvalidValues() + { + // Arrange + var filter = new PageingFilter { PageNumber = 0, PageSize = 0 }; + + // Act + filter.Sanitise(); + + // Assert + 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 Skip_CalculatesCorrectly(int pageNumber, int pageSize, int expectedSkip) + { + // Arrange + var filter = new PageingFilter { PageNumber = pageNumber, PageSize = pageSize }; + + // Assert + Assert.AreEqual(expectedSkip, filter.Skip); + } + } +} \ No newline at end of file diff --git a/src/API/AdventureWorksDemo.Data.Tests.nUnit/Validation/AddressValidatorTests.cs b/src/API/AdventureWorksDemo.Data.Tests/Validaton/AddressValidatorTests.cs similarity index 57% rename from src/API/AdventureWorksDemo.Data.Tests.nUnit/Validation/AddressValidatorTests.cs rename to src/API/AdventureWorksDemo.Data.Tests/Validaton/AddressValidatorTests.cs index e783794..37eb6c6 100644 --- a/src/API/AdventureWorksDemo.Data.Tests.nUnit/Validation/AddressValidatorTests.cs +++ b/src/API/AdventureWorksDemo.Data.Tests/Validaton/AddressValidatorTests.cs @@ -1,240 +1,228 @@ -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 Moq; -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 var entity = _address; - entity.AddressLine1 = value.InterpretValue(); + entity!.AddressLine1 = value.InterpretValue(); //act var result = _validator.TestValidate(entity); //assert 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 var entity = _address; - entity.AddressLine1 = value.InterpretValue(); + entity!.AddressLine1 = value.InterpretValue(); //act var result = _validator.TestValidate(entity); //assert 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 var entity = _address; - entity.AddressLine2 = value.InterpretValue(); + entity!.AddressLine2 = value.InterpretValue(); //act var result = _validator.TestValidate(entity); //assert 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 var entity = _address; - entity.AddressLine2 = value.InterpretValue(); + entity!.AddressLine2 = value.InterpretValue(); //act var result = _validator.TestValidate(entity); //assert 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 var entity = _address; - entity.City = value.InterpretValue(); + entity!.City = value.InterpretValue(); //act var result = _validator.TestValidate(entity); //assert 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 var entity = _address; - entity.City = value.InterpretValue(); + entity!.City = value.InterpretValue(); //act var result = _validator.TestValidate(entity); //assert 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 var entity = _address; - entity.CountryRegion = value.InterpretValue(); + entity!.CountryRegion = value.InterpretValue(); //act var result = _validator.TestValidate(entity); //assert 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 var entity = _address; - entity.CountryRegion = value.InterpretValue(); + entity!.CountryRegion = value.InterpretValue(); //act var result = _validator.TestValidate(entity); //assert 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 var entity = _address; - entity.PostalCode = value.InterpretValue(); + entity!.PostalCode = value.InterpretValue(); //act var result = _validator.TestValidate(entity); //assert 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 var entity = _address; - entity.PostalCode = value.InterpretValue(); + entity!.PostalCode = value.InterpretValue(); //act var result = _validator.TestValidate(entity); //assert 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 var entity = _address; - entity.StateProvince = value.InterpretValue(); + entity!.StateProvince = value.InterpretValue(); //act var result = _validator.TestValidate(entity); //assert 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 var entity = _address; - entity.StateProvince = value.InterpretValue(); + entity!.StateProvince = value.InterpretValue(); //act var result = _validator.TestValidate(entity); //assert 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..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.0 enable @@ -10,7 +14,7 @@ - - + + diff --git a/src/API/AdventureWorksDemo.Data/Extentions/IQueryableExtensionsPaging.cs b/src/API/AdventureWorksDemo.Data/Extentions/IQueryableExtensionsPaging.cs new file mode 100644 index 0000000..4e03441 --- /dev/null +++ b/src/API/AdventureWorksDemo.Data/Extentions/IQueryableExtensionsPaging.cs @@ -0,0 +1,116 @@ +using System.Linq.Expressions; +using System.Reflection; + +using AdventureWorksDemo.Data.Paging; + +namespace AdventureWorksDemo.Data.Extentions +{ + public static class IQueryableExtensions + { + #region ApplyFilters + public static IQueryable? ApplyFilters(this IQueryable query, PageingFilter? pagingfilter) + { + if (pagingfilter == null || query == null || !query!.Any() + || pagingfilter.Filter==null) + return query; + + pagingfilter.Sanitise(); + + + foreach (var filter in pagingfilter.Filter!) + { + var parts = filter.Split('|'); + if (parts.Length != 3) + throw new ArgumentException("Invalid filter format. Expected format: 'PropertyName | Expression | Value'"); + + string propertyName = parts[0].Trim(); + string expression = parts[1].Trim(); + string value = parts[2].Trim(); + + query = ApplyFilter(query, propertyName, expression, value); + } + return query; + } + private static IQueryable ApplyFilter(IQueryable query, string propertyName, string expression, string value) + { + var parameter = Expression.Parameter(typeof(T), "x"); + var property = Expression.Property(parameter, propertyName); + var propertyType = property.Type; + + object convertedValue = Convert.ChangeType(value, propertyType); + var constant = Expression.Constant(convertedValue); + + Expression comparison = expression.ToLower() switch + { + "equals" => Expression.Equal(property, constant), + "notequals" => Expression.NotEqual(property, constant), + "greaterthan" => Expression.GreaterThan(property, constant), + "lessthan" => Expression.LessThan(property, constant), + "greaterthanorequal" => Expression.GreaterThanOrEqual(property, constant), + "lessthanorequal" => Expression.LessThanOrEqual(property, constant), + "contains" => Expression.Call(property, typeof(string).GetMethod("Contains", [typeof(string)])!, constant), + "not contains" => Expression.Call(property, typeof(string).GetMethod("Not Contains", [typeof(string)])!, constant), + _ => throw new ArgumentException($"Invalid expression: {expression}") + }; + + var lambda = Expression.Lambda>(comparison, parameter); + return query.Where(lambda); + } + #endregion + + public static IQueryable? ApplyPageing(this IQueryable? query, PageingFilter? filter) //where T : class + { + if (filter == null) + 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) + ?? 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); + +#pragma warning disable S3358 // Ternary operators should not be nested + var methodName = orderedQuery == null + ? (descending ? "OrderByDescending" : "OrderBy") + : (descending ? "ThenByDescending" : "ThenBy"); +#pragma warning restore S3358 // Ternary operators should not be nested + + 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/Paging/PagedList.cs b/src/API/AdventureWorksDemo.Data/Paging/PagedList.cs index 39ba869..d5d2e5e 100644 --- a/src/API/AdventureWorksDemo.Data/Paging/PagedList.cs +++ b/src/API/AdventureWorksDemo.Data/Paging/PagedList.cs @@ -1,4 +1,5 @@ using Microsoft.EntityFrameworkCore; +using AdventureWorksDemo.Data.Extentions; namespace AdventureWorksDemo.Data.Paging { @@ -21,13 +22,16 @@ public PagedList() public PagedList(IEnumerable items, int count, int currentPage, int pageSize) { - CurrentPage = currentPage; TotalPages = (int)Math.Ceiling(count / (double)pageSize); + CurrentPage = (currentPage > TotalPages) ? TotalPages : currentPage; PageSize = pageSize; TotalCount = count; AddRange(items); } + /// + /// zero index, for example the first page is page 0 + /// public int CurrentPage { get; set; } public int PageSize { get; set; } @@ -36,31 +40,25 @@ public PagedList(IEnumerable items, int count, int currentPage, int pageSize) public int TotalPages { get; set; } - public static async Task> CreateAsync(IQueryable source, int pageNumber, int pageSize) + public static int CalculateLastPageNumber(int recordCount, int pageSize) { - if (pageNumber <= 0) - throw new ArgumentOutOfRangeException(nameof(pageNumber), $"Parameter {nameof(pageNumber)} must be positive"); - if (pageSize <= 0) - throw new ArgumentOutOfRangeException(nameof(pageSize), $"Parameter {nameof(pageSize)} must be positive"); - if (source == null) - return new PagedList([], 0, pageNumber, pageSize); - var count = await source.CountAsync(); - var items = await source.Skip((pageNumber - 1) * pageSize).Take(pageSize).ToListAsync(); - return new PagedList(items ?? [], count, pageNumber, pageSize); + if (recordCount < pageSize) + return 0; + return (int)Math.Floor((decimal)recordCount / (decimal)pageSize); } - } - - public class PageingFilter - { - private int _pageSize = 25; - public int PageNumber { get; set; } = 1; - public int PageSize + public static async Task> CreateAsync(IQueryable? source, PageingFilter filter) { - get => _pageSize; - set => _pageSize = (value > MaxPageSize) ? MaxPageSize : value; - } + filter.Sanitise(); + if (source == null) + return new PagedList([], 0, 0, filter.PageSize); + var count = await source.CountAsync(); + var lastPageNumber = CalculateLastPageNumber(count, filter.PageSize); + if (filter.PageNumber > lastPageNumber) + filter.PageNumber = lastPageNumber; + var items = await source.ApplyPageing(filter)!.ToListAsync(); - internal int MaxPageSize { get; set; } = 100; + return new PagedList(items ?? [], count, filter.PageNumber, filter.PageSize); + } } } \ 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..6392478 --- /dev/null +++ b/src/API/AdventureWorksDemo.Data/Paging/PageingFilter.cs @@ -0,0 +1,47 @@ +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 < 0) + _pageNumber = 0; + } + } + + public int PageSize + { + get => _pageSize; + set + { + _pageSize = (value > MaxPageSize) ? MaxPageSize : value; + if (_pageSize < 1) + _pageSize = 25; + } + } + + public int Skip + { get { return (PageNumber) * PageSize; } } + + public string[]? Sorting { get; set; } = null; + internal int MaxPageSize { get; set; } = 100; + + internal void Sanitise() + { + if (PageSize < 1) + PageSize = 25; + if (PageSize > MaxPageSize) + PageSize = MaxPageSize; + if (PageNumber < 0) + PageNumber = 0; + } + } +} \ No newline at end of file diff --git a/src/API/AdventureWorksDemo.Data/Repository/GenericCRUDRepository.cs b/src/API/AdventureWorksDemo.Data/Repository/GenericCRUDRepository.cs index 7542129..12a7ba4 100644 --- a/src/API/AdventureWorksDemo.Data/Repository/GenericCRUDRepository.cs +++ b/src/API/AdventureWorksDemo.Data/Repository/GenericCRUDRepository.cs @@ -112,7 +112,7 @@ public async Task> DeleteAsync(Expression? FindEntities(Expression>? predicate = null, params string[] includes) { - var query = ApplyIncludes(_dbContext.Set(), includes); + var query = GenericCrudRepository.ApplyIncludes(_dbContext.Set(), includes); return predicate != null ? query.Where(predicate) : query; } @@ -122,7 +122,7 @@ public async Task> DeleteAsync(Expression(), includes); + var query = GenericCrudRepository.ApplyIncludes(_dbContext.Set(), includes); return await query.AsNoTracking().FirstOrDefaultAsync(predicate); } @@ -161,6 +161,11 @@ internal async Task DeleteAsync(TEntity? entity) return result == 1; } + private static IQueryable ApplyIncludes(IQueryable query, IEnumerable includes) + { + return includes.Aggregate(query, (current, include) => current.Include(include)); + } + private static string ConvertExceptionToUserMessage(Exception ex) { ArgumentNullException.ThrowIfNull(ex); @@ -179,11 +184,6 @@ private static string ConvertExceptionToUserMessage(Exception ex) return message; } - private IQueryable ApplyIncludes(IQueryable query, IEnumerable includes) - { - return includes.Aggregate(query, (current, include) => current.Include(include)); - } - private async Task LoadReferences(TEntity entity, IEnumerable>> references) { foreach (var reference in references) diff --git a/src/API/AdventureWorksDemo.Data/Services/AddressService.cs b/src/API/AdventureWorksDemo.Data/Services/AddressService.cs index 0ad2dfb..4d21d15 100644 --- a/src/API/AdventureWorksDemo.Data/Services/AddressService.cs +++ b/src/API/AdventureWorksDemo.Data/Services/AddressService.cs @@ -6,8 +6,6 @@ using FluentValidation; -using Microsoft.IdentityModel.Tokens; - namespace AdventureWorksDemo.Data.Services { public interface IAddressService : diff --git a/src/API/AdventureWorksDemo.Data/Services/BaseService.cs b/src/API/AdventureWorksDemo.Data/Services/BaseService.cs index 4c2d471..1ee431a 100644 --- a/src/API/AdventureWorksDemo.Data/Services/BaseService.cs +++ b/src/API/AdventureWorksDemo.Data/Services/BaseService.cs @@ -1,5 +1,6 @@ using System.Linq.Expressions; +using AdventureWorksDemo.Data.Extentions; using AdventureWorksDemo.Data.Models; using AdventureWorksDemo.Data.Paging; using AdventureWorksDemo.Data.Repository; @@ -77,18 +78,18 @@ public virtual async Task>> AddBatchAsync(IEn }; } - public virtual async Task> FindAllAsync(PageingFilter pageingFilter) => await FindAllAsync(pageingFilter, null); + public virtual async Task> FindAllAsync(PageingFilter pagingfilter) => await FindAllAsync(pagingfilter, null); - public virtual async Task> FindAllAsync(PageingFilter paging, + public virtual async Task> FindAllAsync(PageingFilter pagingfilter, Expression>? predicate) { - IQueryable? query = _repository.FindEntities(predicate); + IQueryable? query = _repository.FindEntities(predicate)! + .ApplyFilters(pagingfilter) + .ApplySorting(pagingfilter); if (query == null) return []; - PagedList result = await PagedList.CreateAsync(query - , paging.PageNumber - , paging.PageSize); + PagedList result = await PagedList.CreateAsync(query, pagingfilter); return EntityPagedListToModelPagedList(result); } diff --git a/src/API/AdventureWorksDemo.Data/Services/ProductCategoryService.cs b/src/API/AdventureWorksDemo.Data/Services/ProductCategoryService.cs index 81c5316..469b162 100644 --- a/src/API/AdventureWorksDemo.Data/Services/ProductCategoryService.cs +++ b/src/API/AdventureWorksDemo.Data/Services/ProductCategoryService.cs @@ -44,7 +44,6 @@ internal override bool IsModelDirty(ProductCategoryModel original, ProductCatego internal override void PreDataMutation(ProductCategory entity) { entity.ModifiedDate = timeProvider.GetLocalNow().DateTime; - //return base.PreDataMutation(entity); } internal override void TransposeModel(ProductCategoryModel original, diff --git a/src/AdventureWorksDemo.sln b/src/AdventureWorksDemo.sln index 6fcd909..dc3ccbf 100644 --- a/src/AdventureWorksDemo.sln +++ b/src/AdventureWorksDemo.sln @@ -7,14 +7,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdventureWorksDemo.Data", " EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{70684F3F-1A6E-44F6-8BCD-29C338660812}" ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig ..\.gitignore = ..\.gitignore ..\README.md = ..\README.md EndProjectSection 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,6 +24,12 @@ 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.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 Debug|Any CPU = Debug|Any CPU @@ -39,10 +44,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 @@ -51,6 +52,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 + {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 @@ -58,9 +71,12 @@ 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} + {9D6855CA-A743-45EC-BB4B-8BDE8A160DBD} = {1F7959F3-B8EC-43C1-BA68-47A80F511DA5} + {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/FrontEnd/AdventureWorksDemo.MudBlazor/AdventureWorksDemo.MudBlazor.csproj b/src/FrontEnd/AdventureWorksDemo.MudBlazor/AdventureWorksDemo.MudBlazor.csproj new file mode 100644 index 0000000..076480a --- /dev/null +++ b/src/FrontEnd/AdventureWorksDemo.MudBlazor/AdventureWorksDemo.MudBlazor.csproj @@ -0,0 +1,14 @@ + + + + net8.0 + enable + enable + + + + + + + + diff --git a/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/App.razor b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/App.razor new file mode 100644 index 0000000..fc42740 --- /dev/null +++ b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/App.razor @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Layout/MainLayout.razor b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Layout/MainLayout.razor new file mode 100644 index 0000000..592cf61 --- /dev/null +++ b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Layout/MainLayout.razor @@ -0,0 +1,105 @@ +@using global::MudBlazor +@inherits LayoutComponentBase + + + + + + + + + Application + + + + + + + + + @Body + + + + +
+ An unhandled error has occurred. + Reload + 🗙 +
+AdventureWords Demo +@code { + private bool _drawerOpen = true; + private bool _isDarkMode = true; + private MudTheme? _theme = null; + + protected override void OnInitialized() + { + base.OnInitialized(); + + _theme = new() + { + PaletteLight = _lightPalette, + PaletteDark = _darkPalette, + LayoutProperties = new LayoutProperties() + }; + } + + + private void DrawerToggle() + { + _drawerOpen = !_drawerOpen; + } + + private void DarkModeToggle() + { + _isDarkMode = !_isDarkMode; + } + + private readonly PaletteLight _lightPalette = new() + { + Black = "#110e2d", + AppbarText = "#424242", + AppbarBackground = "rgba(255,255,255,0.8)", + DrawerBackground = "#ffffff", + GrayLight = "#e8e8e8", + GrayLighter = "#f9f9f9", + }; + + private readonly PaletteDark _darkPalette = new() + { + Primary = "#7e6fff", + Surface = "#1e1e2d", + Background = "#1a1a27", + BackgroundGray = "#151521", + AppbarText = "#92929f", + AppbarBackground = "rgba(26,26,39,0.8)", + DrawerBackground = "#1a1a27", + ActionDefault = "#74718e", + ActionDisabled = "#9999994d", + ActionDisabledBackground = "#605f6d4d", + TextPrimary = "#b2b0bf", + TextSecondary = "#92929f", + TextDisabled = "#ffffff33", + DrawerIcon = "#92929f", + DrawerText = "#92929f", + GrayLight = "#2a2833", + GrayLighter = "#1e1e2d", + Info = "#4a86ff", + Success = "#3dcb6c", + Warning = "#ffb545", + Error = "#ff3f5f", + LinesDefault = "#33323e", + TableLines = "#33323e", + Divider = "#292838", + OverlayLight = "#1e1e2d80", + }; + + public string DarkLightModeButtonIcon => _isDarkMode switch + { + true => Icons.Material.Rounded.AutoMode, + false => Icons.Material.Outlined.DarkMode, + }; +} + + diff --git a/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Layout/NavMenu.razor b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Layout/NavMenu.razor new file mode 100644 index 0000000..8a709cb --- /dev/null +++ b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Layout/NavMenu.razor @@ -0,0 +1,10 @@ +@using global::MudBlazor + + + Home + + Product description + + + + diff --git a/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Pages/Error.razor b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Pages/Error.razor new file mode 100644 index 0000000..576cc2d --- /dev/null +++ b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Pages/Error.razor @@ -0,0 +1,36 @@ +@page "/Error" +@using System.Diagnostics + +Error + +

Error.

+

An error occurred while processing your request.

+ +@if (ShowRequestId) +{ +

+ Request ID: @RequestId +

+} + +

Development Mode

+

+ 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/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Pages/Home.razor b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Pages/Home.razor new file mode 100644 index 0000000..9992eba --- /dev/null +++ b/src/FrontEnd/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/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor new file mode 100644 index 0000000..a8efc82 --- /dev/null +++ b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Pages/ProductDescription.razor @@ -0,0 +1,83 @@ +@page "/productDescription" +@using System.Text +@using System.Net.Mime +@using global::MudBlazor +@inject IConfiguration Configuration + +Product Description + +Product Description +Modify the product descriptions. + + + + + + Product Description + + + + + + + + + + + + +@code { + + + public MudDataGrid? dataGrid ; + + + private async Task> ServerReload(GridState state) + { + + PagedList paging = new(); + IEnumerable data = new List(); + PageingFilter filter = PageingFilter.SetByGridState(state, "Description"); + string url = $"{Configuration["Api:base"]}{Configuration["Api:productdescription"]}"; + var request = new HttpRequestMessage + { + Method= HttpMethod.Get, + RequestUri = new Uri(url), + Content = new StringContent(filter.ToJSON(), + Encoding.UTF8, + MediaTypeNames.Application.Json), + }; + + var response = await httpClient.SendAsync(request).ConfigureAwait(false); + if (response.IsSuccessStatusCode) + { + data = (await response!.Content!.ReadFromJsonAsync>()) ?? new (); + paging = PagedList.FromIEnumerable(response.Headers.GetValues("X-Pagination").SingleOrDefault()); + } + + return new GridData + { + TotalItems = paging.TotalCount, + Items = data, + }; + } + + private Task OnClear() + { + return dataGrid!.ReloadServerData(); + } + + private Task OnSearch(string text) + { + + return dataGrid!.ReloadServerData(); + } + +} diff --git a/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Routes.razor b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Routes.razor new file mode 100644 index 0000000..f756e19 --- /dev/null +++ b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/Routes.razor @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/_Imports.razor b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Components/_Imports.razor new file mode 100644 index 0000000..a4312bc --- /dev/null +++ b/src/FrontEnd/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 AdventureWorksDemo.MudBlazor.Components +@using AdventureWorksDemo.MudBlazor.Models + +@using Microsoft.Extensions.Configuration \ No newline at end of file diff --git a/src/FrontEnd/AdventureWorksDemo.MudBlazor/Models/PagedList.cs b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Models/PagedList.cs new file mode 100644 index 0000000..9026807 --- /dev/null +++ b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Models/PagedList.cs @@ -0,0 +1,32 @@ +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"); + } + } +} \ No newline at end of file diff --git a/src/FrontEnd/AdventureWorksDemo.MudBlazor/Models/PageingFilter.cs b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Models/PageingFilter.cs new file mode 100644 index 0000000..f24a0ec --- /dev/null +++ b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Models/PageingFilter.cs @@ -0,0 +1,52 @@ +using MudBlazor; + +namespace AdventureWorksDemo.MudBlazor.Models +{ + public class PageingFilter + { + public string[] Filter { get; set; } = []; + + /// + /// PageNumber is zero based + /// + public int PageNumber { get; set; } = 1; + + public int PageSize { get; set; } = 25; + public string[] Sorting { get; set; } = []; + + public static PageingFilter SetByGridState(GridState state, string defaultSorting) + { + 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, defaultSorting), + }; + } + internal string ToJSON() + { + return System.Text.Json.JsonSerializer.Serialize(this); + } + private static string DescendingText(bool isDescending) => isDescending ? "DESC" : "ASC"; + + private static string[] SortingArray(ICollection>? sortDefinitions, string defaultSorting ) + { + if (sortDefinitions == null || sortDefinitions.Count == 0) + { + if (string.IsNullOrEmpty(defaultSorting)) + throw new ArgumentOutOfRangeException(nameof(defaultSorting)); + else + return [defaultSorting.Trim()]; + } + + return (from m in sortDefinitions + select $"{m.SortBy} {DescendingText(m.Descending)}" + ).ToArray() ; + } + } +} \ No newline at end of file diff --git a/src/FrontEnd/AdventureWorksDemo.MudBlazor/Models/ProductDescriptionModel.cs b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Models/ProductDescriptionModel.cs new file mode 100644 index 0000000..11f884a --- /dev/null +++ b/src/FrontEnd/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/FrontEnd/AdventureWorksDemo.MudBlazor/Program.cs b/src/FrontEnd/AdventureWorksDemo.MudBlazor/Program.cs new file mode 100644 index 0000000..193d1e0 --- /dev/null +++ b/src/FrontEnd/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/FrontEnd/AdventureWorksDemo.MudBlazor/appsettings.Development.json b/src/FrontEnd/AdventureWorksDemo.MudBlazor/appsettings.Development.json new file mode 100644 index 0000000..b49edf4 --- /dev/null +++ b/src/FrontEnd/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/FrontEnd/AdventureWorksDemo.MudBlazor/appsettings.json b/src/FrontEnd/AdventureWorksDemo.MudBlazor/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/src/FrontEnd/AdventureWorksDemo.MudBlazor/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/src/FrontEnd/AdventureWorksDemo.MudBlazor/wwwroot/favicon.ico b/src/FrontEnd/AdventureWorksDemo.MudBlazor/wwwroot/favicon.ico new file mode 100644 index 0000000..1239223 Binary files /dev/null and b/src/FrontEnd/AdventureWorksDemo.MudBlazor/wwwroot/favicon.ico differ