Ejemplo n.º 1
0
        public async Task CopyLogData_TimeIndexed()
        {
            var wellUid     = "W-5232880";
            var wellboreUid = "B-5232880";
            var job         = new CopyLogDataJob
            {
                LogCurvesReference = new LogCurvesReference
                {
                    LogReference = new LogReference
                    {
                        WellUid     = wellUid,
                        WellboreUid = wellboreUid,
                        LogUid      = "GM_Date_Time_GMTime"
                    }
                },
                Target = new LogReference
                {
                    WellUid     = wellUid,
                    WellboreUid = wellboreUid,
                    LogUid      = "230a60db-54e1-441d-afa6-0807ad308d7a"
                }
            };

            await worker.Execute(job);
        }
        public async Task CopyLogData_TimeIndexed()
        {
            var job = CreateJobTemplate();

            SetupSourceLog(WitsmlLog.WITSML_INDEX_TYPE_DATE_TIME);
            SetupTargetLog(WitsmlLog.WITSML_INDEX_TYPE_DATE_TIME);
            var        updatedLogs = SetupUpdateInStoreAsync();
            WitsmlLogs query       = null;

            witsmlClient.Setup(client => client.GetFromStoreAsync(It.IsAny <WitsmlLogs>(), OptionsIn.DataOnly))
            .Callback <WitsmlLogs, OptionsIn>((logs, _) => query = logs)
            .ReturnsAsync(() => GetSourceLogData(query.Logs.First().StartDateTimeIndex, query.Logs.First().EndDateTimeIndex));

            await worker.Execute(job);

            Assert.Equal(string.Join(",", SourceMnemonics[WitsmlLog.WITSML_INDEX_TYPE_DATE_TIME]), updatedLogs.First().Logs.First().LogData.MnemonicList);
            Assert.Equal(5, updatedLogs.First().Logs.First().LogData.Data.Count);
        }