示例#1
0
        public async Task TestAddUserAsync_VerifyInsertAsyncCalledOnce()
        {
            var mockRepository = new Mock <IUserRepository>();
            var manageUser     = new ManageUser(mockRepository.Object, fixture.ManageUserLogger);
            var user           = new User();
            var result         = await manageUser.AddUserAsync(user);

            mockRepository.Verify(r => r.InsertAsync(user), Times.Once);
        }