Пример #1
0
        public async Task <GarmentStockOpname> GetTestData()
        {
            var urn = await unitReceiptNoteDataUtil.GetTestData();

            var doItems      = urn.Items.Select(i => unitReceiptNoteDataUtil.ReadDOItemsByURNItemId((int)i.Id)).ToList();
            var firstDOItems = doItems.First();
            var newData      = await facade.Upload(GetExcel(doItems, null, firstDOItems.UnitCode, firstDOItems.StorageCode, firstDOItems.StorageName));

            return(newData);
        }
Пример #2
0
        public async Task Upload_Success()
        {
            var serviceProvider = GetServiceProviderMock().Object;
            var dbContext       = _dbContext(GetCurrentMethod());
            var facade          = new GarmentStockOpnameFacade(serviceProvider, dbContext);
            var dataUtil        = this.dataUtil(facade, serviceProvider, dbContext);
            var data            = await dataUtil.GetNewData();

            var firstData = data.First();
            var excel     = dataUtil.GetExcel(data, null, firstData.UnitCode, firstData.StorageCode, firstData.StorageName);

            var Response = await facade.Upload(excel);

            Assert.NotEqual(0, Response.Id);
        }