Skip to content

Commit

Permalink
add postValidation on showcase relationalStore/Service/Basic
Browse files Browse the repository at this point in the history
  • Loading branch information
YannanGao-gs committed Jan 26, 2024
1 parent 30412d8 commit cb8403f
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion showcases/data/Store/Relational Store/Service/Basic/code.pure
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,20 @@ 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
Expand Down Expand Up @@ -445,6 +459,20 @@ 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
Expand Down Expand Up @@ -1186,4 +1214,4 @@ Runtime showcase::northwind::runtime::NorthwindRuntime
}#
]
];
}
}

0 comments on commit cb8403f

Please sign in to comment.