Пример #1
0
        public async Task ShouldAddFavouriteSupplierListThrowException()
        {
            FavouriteSupplierListModel favouriteSupplierList = new FavouriteSupplierListModel()
            {
                Name = "name", BranchId = 1
            };

            _moqSupplierQueries.Setup(s => s.FindFavouriteListByName(It.IsAny <string>(), It.IsAny <int>()))
            .Returns(() =>
            {
                return(Task.FromResult <FavouriteSupplierList>(new IDMDefaults().GetFavouriteSupplierList()));
            });
            await Assert.ThrowsAsync <BusinessRuleException>(async() => await _sut.AddFavouriteSupplierList(favouriteSupplierList));
        }