mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-05-09 08:04:13 -04:00
unit tests added for new list operations
This commit is contained in:
@@ -601,57 +601,70 @@ namespace TemplatesTests
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[DataRow(@"<cmp codec = 'aac[lc]\mp3'->true<-cmp>", "true")]
|
||||
[DataRow(@"<cmp codec = 'aac[lc]\mp4'->true<-cmp>", "")]
|
||||
[DataRow("<cmp title = 'A Study in Scarlet: An Audible Original Drama'->true<-cmp>", "true")]
|
||||
[DataRow("<!cmp title = 'A Study in Scarlet: An Audible Original Drama'->false<-cmp>", "")]
|
||||
[DataRow("<cmp title[U] = 'A STUDY IN SCARLET: AN AUDIBLE ORIGINAL DRAMA'->true<-cmp>", "true")]
|
||||
[DataRow("<cmp title #= '45'->true<-cmp>", "")]
|
||||
[DataRow("<cmp title #= 45->true<-cmp>", "true")]
|
||||
[DataRow("<cmp 45 #= title->true<-cmp>", "true")]
|
||||
[DataRow("<cmp title != 'foo'->true<-cmp>", "true")]
|
||||
[DataRow("<cmp 'foo' != title->true<-cmp>", "true")]
|
||||
[DataRow("<cmp 'foo' != 'bar''->true<-cmp>", "true")]
|
||||
[DataRow("<!cmp title != 'foo'->false<-cmp>", "")]
|
||||
[DataRow("<cmp title ~ 'A Study.*'->true<-cmp>", "true")]
|
||||
[DataRow("<cmp title = 'foo'->true<-cmp>", "")]
|
||||
[DataRow("<cmp ch count >= '99'->true<-cmp>", "true")]
|
||||
[DataRow("<cmp ch count >= 1->true<-cmp>", "true")]
|
||||
[DataRow("<cmp ch count > 1->true<-cmp>", "true")]
|
||||
[DataRow("<cmp ch count <= 100->true<-cmp>", "true")]
|
||||
[DataRow("<cmp ch count < 100->true<-cmp>", "true")]
|
||||
[DataRow("<cmp ch count = 2->true<-cmp>", "true")]
|
||||
[DataRow("<cmp author >= '3'->true<-cmp>", "true")]
|
||||
[DataRow("<cmp author >= 3->true<-cmp>", "")]
|
||||
[DataRow("<cmp author >= 2->true<-cmp>", "true")]
|
||||
[DataRow("<cmp author #= 2->true<-cmp>", "true")]
|
||||
[DataRow("<cmp author = 'Arthur Conan Doyle'->true<-cmp>", "true")]
|
||||
[DataRow("<cmp author[format({L})] = 'Doyle'->true<-cmp>", "true")]
|
||||
[DataRow("<!cmp author[format({L})] = 'Doyle'->false<-cmp>", "")]
|
||||
[DataRow("<cmp author[format({L})] != 'Doyle'->true<-cmp>", "true")]
|
||||
[DataRow("<!cmp author[format({L})] != 'Doyle'->false<-cmp>", "")]
|
||||
[DataRow("<cmp author[format({L})separator(:)] = 'Doyle:Fry'->true<-cmp>", "true")]
|
||||
[DataRow(@"<cmp author[slice(99)] =~ '.\*'->true<-cmp>", "")]
|
||||
[DataRow("<cmp author[slice(99)separator(:)] =~ '.*'->true<-cmp>", "")]
|
||||
[DataRow("<cmp author[slice(-9)separator(:)] =~ '.*'->true<-cmp>", "")]
|
||||
[DataRow("<cmp author[slice(2..1)separator(:)] ~ '.*'->true<-cmp>", "")]
|
||||
[DataRow("<cmp author[slice(-1..1)separator(:)] ~ '.*'->true<-cmp>", "")]
|
||||
[DataRow("<cmp author[slice(-1..-2)separator(:)] ~ '.*'->true<-cmp>", "")]
|
||||
[DataRow("<cmp author = 'Sherlock'->true<-cmp>", "")]
|
||||
[DataRow("<!cmp author = 'Sherlock'->false<-cmp>", "false")]
|
||||
[DataRow("<cmp author != 'Sherlock'->true<-cmp>", "true")]
|
||||
[DataRow("<!cmp author != 'Sherlock'->false<-cmp>", "")]
|
||||
[DataRow("<cmp tag = 'Tag1'->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag[separator( : )slice(-2..)] = 'Tag2 : Tag3'->true<-cmp>", "true")]
|
||||
[DataRow("<cmp audible subtitle[3] = 'an'->true<-cmp>", "")]
|
||||
[DataRow("<cmp audible subtitle[3] = 'an '->true<-cmp>", "true")]
|
||||
[DataRow("<cmp audible subtitle[3] = ' an'->true<-cmp>", "")]
|
||||
[DataRow("<cmp audible subtitle[3] = ' an '->true<-cmp>", "")]
|
||||
[DataRow("<cmp minutes > '42'->true<-cmp>", "true")]
|
||||
[DataRow("<cmp minutes > 42->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag = 'Tag2'->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag >> 'Tag2'->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag :contains: 'Tag2'->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag && tag->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag >=> tag->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag >-> tag->true<-cmp>", "")]
|
||||
//
|
||||
[DataRow("<cmp tag = tag ->true<-cmp>", "")]
|
||||
[DataRow("<cmp tag ≡ tag ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag == tag ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag :equals: tag ->true<-cmp>", "true")]
|
||||
//
|
||||
[DataRow("<cmp tag[slice(1..2)] ∌ tag[slice(3)] ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag[slice(1..2)] !>> tag[slice(3)] ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag[slice(1..2)] ∌ tag[slice(3)] ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag[slice(1..2)] :not_contains: tag[slice(3)] ->true<-cmp>", "true")]
|
||||
//
|
||||
[DataRow("<cmp tag ∋ tag[slice(2)] ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag >> tag[slice(2)] ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag :contains: tag[slice(2)] ->true<-cmp>", "true")]
|
||||
//
|
||||
[DataRow("<cmp tag[slice(3)] ∉ tag[slice(1..2)] ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag[slice(3)] !<< tag[slice(1..2)] ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag[slice(3)] ∉ tag[slice(1..2)] ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag[slice(3)] :not_in: tag[slice(1..2)] ->true<-cmp>", "true")]
|
||||
//
|
||||
[DataRow("<cmp tag[slice(2)] ∈ tag ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag[slice(2)] << tag ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag[slice(2)] :in: tag ->true<-cmp>", "true")]
|
||||
//
|
||||
[DataRow("<cmp tag[slice(1..2)] ⋂̸ tag[slice(3..4)] ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag[slice(1..2)] &&! tag[slice(3..4)] ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag[slice(1..2)] ⋂! tag[slice(3..4)] ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag[slice(1..2)] :disjoint: tag[slice(3..4)] ->true<-cmp>", "true")]
|
||||
//
|
||||
[DataRow("<cmp tag[slice(1..2)] ⋂ tag[slice(2..4)] ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag[slice(1..2)] && tag[slice(2..4)] ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag[slice(1..2)] :overlaps: tag[slice(2..4)] ->true<-cmp>", "true")]
|
||||
//
|
||||
[DataRow("<cmp tag[slice(1..2)] ⊆ tag[slice(1..2)] ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag[slice(1..2)] ⊆ tag ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag[slice(1..2)] <=< tag ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag[slice(1..2)] :subset: tag ->true<-cmp>", "true")]
|
||||
//
|
||||
[DataRow("<cmp tag[slice(1..2)] ⊇ tag[slice(1..2)] ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag ⊇ tag[slice(1..2)] ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag >=> tag[slice(1..2)] ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag :superset: tag[slice(1..2)] ->true<-cmp>", "true")]
|
||||
//
|
||||
[DataRow("<cmp tag[slice(1..2)] ⊂ tag[slice(1..2)] ->true<-cmp>", "")]
|
||||
[DataRow("<cmp tag[slice(1..2)] ⊂ tag ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag[slice(1..2)] <-< tag ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag[slice(1..2)] :proper_subset: tag ->true<-cmp>", "true")]
|
||||
//
|
||||
[DataRow("<cmp tag[slice(1..2)] ⊃ tag[slice(1..2)] ->true<-cmp>", "")]
|
||||
[DataRow("<cmp tag ⊃ tag[slice(1..2)] ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag >-> tag[slice(1..2)] ->true<-cmp>", "true")]
|
||||
[DataRow("<cmp tag :proper_superset: tag[slice(1..2)] ->true<-cmp>", "true")]
|
||||
public void Cmp_test(string template, string expected)
|
||||
{
|
||||
var bookDto = GetLibraryBook();
|
||||
|
||||
Reference in New Issue
Block a user