It might be useful to be able to specify field keys, names, and values, like this:
[Theory, AutoSitecore]
public void GetFields([FieldData(id:"dc6f8e14-629e-43b8-bf59-527f0328648f", name:"Title", value:"Welcome")][FieldData(id:"c9b44403-be9e-4fd8-8531-5743ea81ef4c", name: "Body", value:"<p>This is text.</p>")]Item item)
{
item["Title"].Should().Be("Welcome");
item["Body"].Should().Be("<p>This is text.</p>");
}
Key points:
- You can string multiple FieldData attributes together.
- If FieldData is present, then use this and not the ItemData fields value (e.g. don't create anonymous field values)
- If Id, Name, or Value are not specified, create anonymous values for the missing parameters.
- Eventually, this should be usable outside of a parameter, in the main body of the test.
It might be useful to be able to specify field keys, names, and values, like this:
Key points: