I am learning Moq, and I would like to make fun of the ISecureAsset interface, which has a Contexts property that returns a list of SecurityContexts. I am testing a method on another class that accesses the Contexts property for authorization.
public interface ISecureAsset { List<SecurityContext> Contexts { get; set; } }
How can I do this with Moq? I also want to be able to set values ββin the Contexts list.
source share