I create the class of book as below
public class book
{
public int id {get;set;}
public string bookName {get;set;}
}
I define the list of book data : List<book> books
as
[
{"id":1,"bookName":"falling apple"},{"id":2,"bookName":"fall app"},{"id":3,"bookName":"fall apples"}
]
I want to make assertion should be true , if bookName in List of Books can find in string[] expectResults {"apple", "ap"}
Just the below example
books.should().match(m=>m.any(expectResults.contains(m.bookName)))
But it always failure, can anyone advise how to do it ?
Thank you