Unit testing custom table

Chibin Zhang asked on January 10, 2020 02:54


I'm trying to figure out how to fake the custom table data similar to this.

var test = Fake<CustomTableItem, CustomTableItemProvider>();

It seems like CustomTableItem does not have a type info, so it cannot be fake. Am I doing it wrong? Is there an alternative way to fake it?


Recent Answers

Roman Hutnyk answered on January 10, 2020 09:00

If you have custom table you need to generate code for it in Kentico admin under your particular custom table -> Code tab. This would give you a class inherited from CustomTableItem and I believe this is what you need to fake.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.