From 473de49f45182676286cc87244d96587db80ed7c Mon Sep 17 00:00:00 2001 From: Yannan Date: Thu, 25 Jan 2024 16:28:12 -0500 Subject: [PATCH] add postValidation on showcase relationalStore/Service/Basic --- .../Relational Store/Service/Basic/code.pure | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/showcases/data/Store/Relational Store/Service/Basic/code.pure b/showcases/data/Store/Relational Store/Service/Basic/code.pure index c47a370e0..3e2de723c 100644 --- a/showcases/data/Store/Relational Store/Service/Basic/code.pure +++ b/showcases/data/Store/Relational Store/Service/Basic/code.pure @@ -372,6 +372,18 @@ Service showcase::northwind::services::tds::OrderDetailsByIdTDS mapping: showcase::northwind::mapping::NorthwindMapping; runtime: showcase::northwind::runtime::NorthwindRuntime; } + postValidations: + [ + { + description: 'a simple passing validation with static parameter'; + params:[ + |10248 + ]; + assertions:[ + rowCountGreaterThan10: tds: TabularDataSet[1]|$tds->filter(row|$row.getString('Employee/First Name')->startsWith('T'))->meta::legend::service::validation::assertTabularDataSetEmpty('Expected no Employee/First Name to begin with the letter T') + ]; + } + ] } Service showcase::northwind::services::tds::ProductRankingWithinCategory @@ -445,6 +457,18 @@ Service showcase::northwind::services::tds::Customers mapping: showcase::northwind::mapping::NorthwindMapping; runtime: showcase::northwind::runtime::NorthwindRuntime; } + postValidations: + [ + { + description: 'A simple passing validation'; + params:[ + + ]; + assertions:[ + noCompanyNamedAroundtheHorn: tds: TabularDataSet[1]|$tds->filter(row|$row.getString('Company Name')->contains('Around the Hornsss'))->meta::legend::service::validation::assertTabularDataSetEmpty('Expected there is no company named Around the Hornsss') + ]; + } + ] } Service showcase::northwind::services::graph::ShipperValidationDefects