Skip to content

Commit

Permalink
Add partial query restrictions
Browse files Browse the repository at this point in the history
  • Loading branch information
Konard committed Dec 7, 2024
1 parent c876bc7 commit 3276dc9
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Foundation.Data.Doublets.Cli.Tests/MixedQueryProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,42 @@ public void DeleteMultipleLinksTest()
});
}

[Fact]
public void DeleteLinksByAnyTargetTest()
{
RunTestWithLinks(links =>
{
// Arrange
ProcessQuery(links, "(() ((1 2) (2 2)))");

// Act
ProcessQuery(links, "(((1 *)) ())");

// Assert
var allLinks = GetAllLinks(links);
Assert.Single(allLinks);
AssertLinkExists(allLinks, 2, 2, 2);
});
}

[Fact]
public void DeleteLinksByAnySourceTest()
{
RunTestWithLinks(links =>
{
// Arrange
ProcessQuery(links, "(() ((1 1) (1 2)))");

// Act
ProcessQuery(links, "(((* 2)) ())");

// Assert
var allLinks = GetAllLinks(links);
Assert.Single(allLinks);
AssertLinkExists(allLinks, 1, 1, 1);
});
}

[Fact]
public void DeleteAllLinksBySourceAndTargetTest()
{
Expand Down

0 comments on commit 3276dc9

Please sign in to comment.