From dffcd5f762896b2562d14d695c90d6b9baad083c Mon Sep 17 00:00:00 2001 From: Donghai Date: Fri, 25 Oct 2024 17:00:26 +0800 Subject: [PATCH] update --- .../property/SPGPropertyValueTest.groovy | 40 ------------------- .../graphstore/RiskMiningLPGRecord.groovy | 32 --------------- .../util/VertexRecordConvertorTest.groovy | 30 -------------- 3 files changed, 102 deletions(-) delete mode 100644 builder/model/src/test/groovy/com/antgroup/openspg/builder/model/record/property/SPGPropertyValueTest.groovy delete mode 100644 cloudext/interface/graph-store/src/test/groovy/com/antgroup/openspg/cloudext/interfaces/graphstore/RiskMiningLPGRecord.groovy delete mode 100644 cloudext/interface/graph-store/src/test/groovy/com/antgroup/openspg/cloudext/interfaces/graphstore/adapter/util/VertexRecordConvertorTest.groovy diff --git a/builder/model/src/test/groovy/com/antgroup/openspg/builder/model/record/property/SPGPropertyValueTest.groovy b/builder/model/src/test/groovy/com/antgroup/openspg/builder/model/record/property/SPGPropertyValueTest.groovy deleted file mode 100644 index c6c0fdc5d..000000000 --- a/builder/model/src/test/groovy/com/antgroup/openspg/builder/model/record/property/SPGPropertyValueTest.groovy +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2023 OpenSPG Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. - */ - -package com.antgroup.openspg.builder.model.record.property - -import spock.lang.Specification - -class SPGPropertyValueTest extends Specification { - - def "testGetStdValue"() { - given: - def value = new SPGPropertyValue("bd8cc63024c7a1d4adb3d08f0f4d4827,1ef0e106653b871d429cfab0cd5ea70a") - value.setStds(["bd8cc63024c7a1d4adb3d08f0f4d4827", "1ef0e106653b871d429cfab0cd5ea70a"]) - - expect: - value.getStdValue() == 'bd8cc63024c7a1d4adb3d08f0f4d4827,1ef0e106653b871d429cfab0cd5ea70a' - } - - def "testMerge"() { - expect: - def otherValue = new SPGPropertyValue("bd8cc63024c7a1d4adb3d08f0f4d4827") - value.merge(otherValue) - value.getRaw() == expectRaw - - where: - value || expectRaw - new SPGPropertyValue(null) || "bd8cc63024c7a1d4adb3d08f0f4d4827" - new SPGPropertyValue("1ef0e106653b871d429cfab0cd5ea70a") || "1ef0e106653b871d429cfab0cd5ea70a,bd8cc63024c7a1d4adb3d08f0f4d4827" - } -} diff --git a/cloudext/interface/graph-store/src/test/groovy/com/antgroup/openspg/cloudext/interfaces/graphstore/RiskMiningLPGRecord.groovy b/cloudext/interface/graph-store/src/test/groovy/com/antgroup/openspg/cloudext/interfaces/graphstore/RiskMiningLPGRecord.groovy deleted file mode 100644 index 31e2e1a3e..000000000 --- a/cloudext/interface/graph-store/src/test/groovy/com/antgroup/openspg/cloudext/interfaces/graphstore/RiskMiningLPGRecord.groovy +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2023 OpenSPG Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. - */ - -package com.antgroup.openspg.cloudext.interfaces.graphstore - -import com.antgroup.openspg.builder.test.RiskMiningRecord -import com.antgroup.openspg.cloudext.interfaces.graphstore.model.lpg.record.LPGPropertyRecord -import com.antgroup.openspg.cloudext.interfaces.graphstore.model.lpg.record.VertexRecord -import spock.lang.Specification - -class RiskMiningLPGRecord extends Specification { - - public final static VertexRecord PERSON_RECORD1 = new VertexRecord( - RiskMiningRecord.PERSON_RECORD1.id, - RiskMiningRecord.PERSON_RECORD1.getName(), - [ - new LPGPropertyRecord("name", "裘**"), - new LPGPropertyRecord("age", 58L), - new LPGPropertyRecord("hasPhone", "154****7458"), - ] - ); -} diff --git a/cloudext/interface/graph-store/src/test/groovy/com/antgroup/openspg/cloudext/interfaces/graphstore/adapter/util/VertexRecordConvertorTest.groovy b/cloudext/interface/graph-store/src/test/groovy/com/antgroup/openspg/cloudext/interfaces/graphstore/adapter/util/VertexRecordConvertorTest.groovy deleted file mode 100644 index 638555a47..000000000 --- a/cloudext/interface/graph-store/src/test/groovy/com/antgroup/openspg/cloudext/interfaces/graphstore/adapter/util/VertexRecordConvertorTest.groovy +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2023 OpenSPG Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. - */ - -package com.antgroup.openspg.cloudext.interfaces.graphstore.adapter.util - -import com.antgroup.openspg.builder.test.RiskMiningRecord -import com.antgroup.openspg.cloudext.interfaces.graphstore.RiskMiningLPGRecord -import spock.lang.Specification - -class VertexRecordConvertorTest extends Specification { - - def testToVertexRecord() { - expect: - outputRecord == VertexRecordConvertor.toVertexRecord(inputRecord) - - where: - inputRecord || outputRecord - RiskMiningRecord.PERSON_RECORD1_NORMALIZED || RiskMiningLPGRecord.PERSON_RECORD1 - } -}