示例#1
0
        public async void GivenModel_ManagerWillDeleteEntityRecord()
        {
            // Arrange
            var manager = new GenericManager <Word>(UoWFactoryMock.Object);

            UoW.Setup(m => m.CreateRepository <IGenericRepository <Word> >().Delete(It.IsAny <Word>())).Verifiable();
            // Act
            await manager.DeleteAsync(word).ConfigureAwait(false);

            // Assert
            UoW.Verify(m => m.CreateRepository <IGenericRepository <Word> >().Delete(It.Is <Word>(it => it.Id == word.Id)));
        }