示例#1
0
        public void ChannelDataChunkAdapter_AddToStore_Max_Document_Size_Exceeded_Successfully()
        {
            // Adjust Points and Nodes for large file
            WitsmlSettings.LogMaxDataPointsAdd = 5000000;
            WitsmlSettings.LogMaxDataNodesAdd  = 15000;

            // Load Well from file and assert success response
            var response = DevKit.Add_Well_from_file(
                BuildDataFileName(string.Format(_exceedFileFormat, "well")));

            // There is no response if the Well already exists in the database
            if (response != null)
            {
                Assert.AreEqual((short)ErrorCodes.Success, response.Result);
            }

            // Load Wellbore from file and assert success response
            response = DevKit.Add_Wellbore_from_file(
                BuildDataFileName(string.Format(_exceedFileFormat, "wellbore")));
            // There is no response if the Wellbore already exists in the database
            if (response != null)
            {
                Assert.AreEqual((short)ErrorCodes.Success, response.Result);
            }

            // Load Log from file that is larger than 16MB and assert success response
            response = DevKit.Add_Log_from_file(
                BuildDataFileName(string.Format(_exceedFileFormat, "log")));
            // Log should always succeed
            if (response != null)
            {
                Assert.AreEqual((short)ErrorCodes.Success, response.Result);
            }
        }
示例#2
0
        private void AddParents()
        {
            var wellFiles = Directory.GetFiles(_dataDir, "*_Well.xml");

            foreach (var xmlfile in wellFiles)
            {
                var response = _devKit.Add_Well_from_file(xmlfile);
                if (response != null)
                {
                    Assert.AreEqual((short)ErrorCodes.Success, response.Result);
                }
            }

            var wellboreFiles = Directory.GetFiles(_dataDir, "*_Wellbore.xml");

            foreach (var xmlfile in wellboreFiles)
            {
                var response = _devKit.Add_Wellbore_from_file(xmlfile);
                if (response != null)
                {
                    Assert.AreEqual((short)ErrorCodes.Success, response.Result);
                }
            }
        }