示例#1
0
        public void ZoneCreatingWorks()
        {
            Company company = companyRepositoriy.CreateCompany("Тест1");

            Business.Model.Inventorization inventarisation = inventorizationRepositoriy.CreateInventorization(company.Id, DateTime.UtcNow);
            Guid      firstZoneId = Guid.NewGuid();
            ZoneModel firstZone   = new ZoneModel()
            {
                Id   = firstZoneId,
                Name = "тестовая зона 1"
            };

            zoneRepository.Create(firstZone);
            List <ZoneModel> zones = zoneRepository.GetZones(new Guid[] { firstZoneId });

            Assert.IsNotNull(zones);
            Assert.AreEqual(1, zones.Count());

            zoneRepository.DeleteZone(firstZoneId);
            inventorizationRepositoriy.DeleteInventorization(inventarisation.Id);
            companyRepositoriy.DeleteCompany(company.Id);
        }