Esempio n. 1
0
        public void GetAllAsync_Returns_Enumerable_IVehicleMakeBase()
        {
            var list = new Mock <IEnumerable <IVehicleMakeBase> >();

            repoMock.Setup(s => s.GetMakerBaseAsync()).Returns(new Task <IEnumerable <IVehicleMakeBase> >(() => list.Object));
            uowMock.SetupGet(s => s.Makers).Returns(repoMock.Object);


            var makeService = new VehicleMakeService(uowMock.Object);
            var make        = makeService.GetAllMakeAsync();


            //Assert
            Assert.IsAssignableFrom <Task <IEnumerable <IVehicleMakeBase> > >(make);
        }