public void TestSetUp() { _logGenerator = new Log200Generator(); _wellboreReference = new DataObjectReference { ContentType = EtpContentTypes.Witsml200.For(ObjectTypes.Wellbore), Title = _logGenerator.Name("Wellbore"), Uuid = _logGenerator.Uid() }; _timeLog = new Log() { TimeDepth = "Time", Citation = _logGenerator.CreateCitation(_logGenerator.Name("Citation")), Wellbore = _wellboreReference, Uuid = _logGenerator.Uid() }; _depthLog = new Log() { TimeDepth = "Depth", Citation = _logGenerator.CreateCitation(_logGenerator.Name("Citation")), Wellbore = _wellboreReference, Uuid = _logGenerator.Uid() }; _measuredDepthIndex = _logGenerator.CreateMeasuredDepthIndex(IndexDirection.increasing); _dateTimeIndex = _logGenerator.CreateDateTimeIndex(); _elapseTimeIndex = _logGenerator.CreateElapsedTimeIndex(IndexDirection.increasing); _booleanPointMetadata = _logGenerator.CreatePointMetadata("confidence", "confidence", EtpDataType.boolean); _floatPointMetadata = _logGenerator.CreatePointMetadata("Confidence", "Confidence", EtpDataType.@float); _depthLogChannelSet = _logGenerator.CreateChannelSet(_depthLog); _depthLogChannelSet.Index.Add(_measuredDepthIndex); _depthLogChannelSet.Index.Add(_dateTimeIndex); _depthLogChannelSet.Channel.Add(_logGenerator.CreateChannel(_depthLog, _depthLogChannelSet.Index, "Rate of Penetration", "ROP", UnitOfMeasure.mh, "Velocity", EtpDataType.@double, pointMetadataList: _logGenerator.List(_booleanPointMetadata))); _depthLogChannelSet.Channel.Add(_logGenerator.CreateChannel(_depthLog, _depthLogChannelSet.Index, "Hookload", "HKLD", UnitOfMeasure.klbf, "Force", EtpDataType.@double, null)); _timeLogChannelSet = _logGenerator.CreateChannelSet(_timeLog); _timeLogChannelSet.Index.Add(_elapseTimeIndex); _timeLogChannelSet.Channel.Add(_logGenerator.CreateChannel(_timeLog, _timeLogChannelSet.Index, "Rate of Penetration", "ROP", UnitOfMeasure.mh, "Velocity", EtpDataType.@double, pointMetadataList: _logGenerator.List(_floatPointMetadata))); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testDataObjectReferenceAsDataAssociationTarget() public virtual void testDataObjectReferenceAsDataAssociationTarget() { ScriptTask scriptTask = modelInstance.getModelElementById("_3"); DataObjectReference dataObjectReference = modelInstance.getModelElementById("_dataRef_7"); DataOutputAssociation dataOutputAssociation = scriptTask.DataOutputAssociations.GetEnumerator().next(); assertThat(dataOutputAssociation.Target).isEqualTo(dataObjectReference); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testGetDataObjectReference() public virtual void testGetDataObjectReference() { DataObjectReference dataObjectReference = modelInstance.getModelElementById("_dataRef_7"); DataObject dataObject = modelInstance.getModelElementById("_7"); assertThat(dataObjectReference).NotNull; assertThat(dataObjectReference.Name).Null; assertThat(dataObjectReference.DataObject).isEqualTo(dataObject); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void testDataObjectReferenceAsDataAssociationSource() public virtual void testDataObjectReferenceAsDataAssociationSource() { ScriptTask scriptTask = modelInstance.getModelElementById("_3"); DataObjectReference dataObjectReference = modelInstance.getModelElementById("_dataRef_11"); DataInputAssociation dataInputAssociation = scriptTask.DataInputAssociations.GetEnumerator().next(); ICollection <ItemAwareElement> sources = dataInputAssociation.Sources; assertThat(sources.Count).isEqualTo(1); assertThat(sources.GetEnumerator().next()).isEqualTo(dataObjectReference); }