Ejemplo n.º 1
0
        public void DeleteTree()
        {
            var unitCode    = "u1";
            var stratumCode = "st1";
            var sgCode      = "sg1";
            var species     = "sp1";
            var liveDead    = "L";
            var treeCount   = 1;

            using (var database = CreateDatabase())
            {
                var datastore = new CuttingUnitDatastore(database, CruiseID, TestDeviceInfoService.TEST_DEVICEID, new SamplerInfoDataservice(database, CruiseID, TestDeviceInfoService.TEST_DEVICEID));

                var treeID = datastore.CreateMeasureTree(unitCode, stratumCode, sgCode, species, liveDead, treeCount);

                var tree = datastore.GetTree(treeID);
                tree.Should().NotBeNull();

                datastore.DeleteTree(treeID);

                tree = datastore.GetTree(treeID);
                tree.Should().BeNull();
            }
        }