Mocking Guid.NewGuid()
问题 Suppose I have the following entity: public class User { public int Id { get; set; } public string Username { get; set; } public Guid UserGuid { get; set; } public Guid ConfirmationGuid { get; set; } } And the following interface method: void CreateUser(string username); Part of the implementation should create two new GUIDs: one for UserGuid , and another for ConfirmationGuid . They should do this by setting the values to Guid.NewGuid() . I already have abstracted Guid.NewGuid() using an