Exemplo n.º 1
0
        public void AddTrip_NonExistingEntity_Added()
        {
            Mock<ITripRepository> TripRepository = new Mock<ITripRepository>();
            Mock<ILoggerService> loggerService = new Mock<ILoggerService>();

            TripRepository.Setup(o => o.Insert(It.IsAny<Trip>()));

            TripService Service = new TripService(TripRepository.Object, loggerService.Object);
            Trip trip = new Trip()
            {
                ID = Guid.NewGuid()
            };
            bool flag = Service.AddTrip(new Trip());
            Assert.IsTrue(flag);
        }