Exemplo n.º 1
0
        public void Delete_Entity()
        {
            this.mockRepository.Setup(x => x.Delete(It.IsAny <Bidder>()));

            var bidderServices = new BidderService(this.mockRepository.Object);

            Action act = () => bidderServices.Delete(new Bidder());

            act.Should().NotThrow();
        }
Exemplo n.º 2
0
        public void Delete_Null()
        {
            this.mockRepository.Setup(x => x.Delete(It.IsAny <Bidder>())).Throws <NullReferenceException>();

            var bidderServices = new BidderService(this.mockRepository.Object);

            Action act = () => bidderServices.Delete(null);

            act.Should().Throw <NullReferenceException>();
        }