public void UpdatePlot_Stratum()
        {
            var unitCode    = "u1";
            var stratumCode = "st1";
            var plotNumber  = 1;
            var plotID      = Guid.NewGuid().ToString();
            var cruiseID    = CruiseID;

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

                var stratumPlot = new Plot_Stratum()
                {
                    CuttingUnitCode = unitCode,
                    PlotNumber      = plotNumber,
                    StratumCode     = stratumCode,
                    IsEmpty         = false,
                };

                database.Execute($"INSERT INTO Plot (CruiseID, PlotID, CuttingUnitCode, PlotNumber) VALUES " +
                                 $"('{cruiseID}', '{plotID}', '{unitCode}', {plotNumber})");

                datastore.InsertPlot_Stratum(stratumPlot);

                stratumPlot.IsEmpty = true;
                datastore.UpdatePlot_Stratum(stratumPlot);

                var ourStratumPlot = datastore.GetPlot_Stratum(unitCode, stratumCode, plotNumber);

                ourStratumPlot.IsEmpty.Should().Be(true);
            }
        }
        public void DeletePlot_Stratum()
        {
            var unitCode    = "u1";
            var stratumCode = "st1";
            var plotNumber  = 1;
            var plotID      = Guid.NewGuid().ToString();

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

                var stratumPlot = new Plot_Stratum()
                {
                    CuttingUnitCode = unitCode,
                    PlotNumber      = plotNumber,
                    StratumCode     = stratumCode,
                };

                database.Execute("INSERT INTO Plot (CruiseID, PlotID, CuttingUnitCode, PlotNumber) VALUES " +
                                 $"('{CruiseID}', '{plotID}', '{unitCode}', {plotNumber});");

                datastore.InsertPlot_Stratum(stratumPlot);

                var echo = datastore.GetPlot_Stratum(unitCode, stratumCode, plotNumber);
                echo.Should().NotBeNull("where's my echo");

                datastore.DeletePlot_Stratum(echo.CuttingUnitCode, echo.StratumCode, echo.PlotNumber);
            }
        }
        public void InsertStratumPlot()
        {
            var plotNumber  = 1;
            var stratumCode = "st1";
            var unitCode    = "u1";
            var isEmpty     = true;
            var kpi         = 101;
            var plotID      = Guid.NewGuid().ToString();
            var cruiseID    = CruiseID;

            //var remarks = "something";

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

                var stratumPlot = new Plot_Stratum()
                {
                    CuttingUnitCode = unitCode,
                    PlotNumber      = plotNumber,
                    StratumCode     = stratumCode,
                    IsEmpty         = isEmpty,
                    KPI             = kpi,
                    //Remarks = remarks
                };

                database.Execute($"INSERT INTO Plot (CruiseID, PlotID, CuttingUnitCode, PlotNumber) VALUES " +
                                 $"('{cruiseID}', '{plotID}', '{unitCode}', {plotNumber})");

                datastore.InsertPlot_Stratum(stratumPlot);

                datastore.IsPlotNumberAvalible(unitCode, plotNumber).Should().BeFalse("we just took that plot number");

                var plotStratumAgain = datastore.GetPlot_Stratum(unitCode, stratumCode, plotNumber);
                plotStratumAgain.Should().NotBeNull();
                plotStratumAgain.PlotNumber.Should().Be(plotNumber);
                //ourStratumPlot.Remarks.Should().Be(remarks);
                plotStratumAgain.KPI.Should().Be(kpi);
                plotStratumAgain.IsEmpty.Should().Be(isEmpty);
                plotStratumAgain.StratumCode.Should().Be(stratumCode);
            }
        }