Exemplo n.º 1
0
        public async Task Read_With_EmptyKeyword_Return_Success()
        {
            string           testName        = GetCurrentMethod();
            var              dbContext       = _dbContext(testName);
            IIdentityService identityService = new IdentityService {
                Username = "******"
            };

            var model = new GarmentBookingOrderItem()
            {
                GarmentBookingOrder = new GarmentBookingOrder()
            };

            dbContext.GarmentBookingOrderItems.Add(model);
            dbContext.SaveChanges();

            GarmentBookingOrderItemLogic unitUnderTest = new GarmentBookingOrderItemLogic(identityService, GetServiceProvider(testName).Object, dbContext);

            await unitUnderTest.DeleteAsync(model.Id);
        }
Exemplo n.º 2
0
        public void GetBookingOrderIds_Return_Success()
        {
            string           testName        = GetCurrentMethod();
            var              dbContext       = _dbContext(testName);
            IIdentityService identityService = new IdentityService {
                Username = "******"
            };

            var model = new GarmentBookingOrderItem()
            {
                GarmentBookingOrder = new GarmentBookingOrder()
            };

            dbContext.GarmentBookingOrderItems.Add(model);
            dbContext.SaveChanges();

            GarmentBookingOrderItemLogic unitUnderTest = new GarmentBookingOrderItemLogic(identityService, GetServiceProvider(testName).Object, dbContext);

            HashSet <long> result = unitUnderTest.GetBookingOrderIds(model.Id);

            Assert.NotNull(result);
        }