Skip to content

Instantly share code, notes, and snippets.

@gerhart92
Created September 14, 2022 11:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gerhart92/1c42633c8d63c73fac5699c4280ce134 to your computer and use it in GitHub Desktop.
Save gerhart92/1c42633c8d63c73fac5699c4280ce134 to your computer and use it in GitHub Desktop.
public FieldCollection CreateFieldCollection()
{
var db = Substitute.For<Database>();
var item = Substitute.For<Item>(ID.NewID, ItemData.Empty, db);
var fieldCollection = Substitute.For<FieldCollection>(item);
return fieldCollection;
}
public FieldCollection CreateFieldCollectionByDatabase(Database db)
{
var item = Substitute.For<Item>(ID.NewID, ItemData.Empty, db);
var fieldCollection = Substitute.For<FieldCollection>(item);
return fieldCollection;
}
public FieldCollection CreateFieldCollectionByItem(Item item)
{
var fieldCollection = Substitute.For<FieldCollection>(item);
return fieldCollection;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment