Ejemplo n.º 1
0
        public async Task AssertThatResetUserItemsIsCalled()
        {
            SingletonDao.Instance.SetItemDao(_itemDao);
            _itemDao.FindAllItems().Returns(Task.FromResult(_items));
            await _userDao.ResetUserItems(_user);

            _collectionItem.Received().Find(new BsonDocument());
            await _collection.Received().UpdateOneAsync(Arg.Any <ExpressionFilterDefinition <User> >(),
                                                        Arg.Any <UpdateDefinition <User> >());
        }
Ejemplo n.º 2
0
 public async Task <List <Item> > GetAllItems()
 {
     return(await _itemDao.FindAllItems());
 }
Ejemplo n.º 3
0
 public void AssertThatFindAllItemsIsCalled()
 {
     _itemDao.FindAllItems();
     _collectionItem.Received().Find(new BsonDocument());
     Assert.IsInstanceOf <Task <List <Item> > >(_itemDao.FindAllItems());
 }