diff options
author | ys9693 <ys9693@att.com> | 2020-01-19 13:50:02 +0200 |
---|---|---|
committer | Ofir Sonsino <ofir.sonsino@intl.att.com> | 2020-01-22 12:33:31 +0000 |
commit | 16a9fce0e104a38371a9e5a567ec611ae3fc7f33 (patch) | |
tree | 03a2aff3060ddb5bc26a90115805a04becbaffc9 /catalog-ui/src/jest/mocks/req-and-capabilities.mock.ts | |
parent | aa83a2da4f911c3ac89318b8e9e8403b072942e1 (diff) |
Catalog alignment
Issue-ID: SDC-2724
Signed-off-by: ys9693 <ys9693@att.com>
Change-Id: I52b4aacb58cbd432ca0e1ff7ff1f7dd52099c6fe
Diffstat (limited to 'catalog-ui/src/jest/mocks/req-and-capabilities.mock.ts')
-rw-r--r-- | catalog-ui/src/jest/mocks/req-and-capabilities.mock.ts | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/catalog-ui/src/jest/mocks/req-and-capabilities.mock.ts b/catalog-ui/src/jest/mocks/req-and-capabilities.mock.ts new file mode 100644 index 0000000000..467f00d491 --- /dev/null +++ b/catalog-ui/src/jest/mocks/req-and-capabilities.mock.ts @@ -0,0 +1,30 @@ +import {Requirement} from "../../app/models/requirement"; + +export const requirementMock = [ + {"name": "dependency", "capability": "tosca.capabilities.Node", "node": "tosca.nodes.Root", "relationship": "tosca.relationships.DependsOn", "minOccurrences": "0", "maxOccurrences": "UNBOUNDED"}, + {"name": "binding", "capability": "tosca.capabilities.network.Bindable", "node": null, "relationship": "tosca.relationships.network.BindsTo", "minOccurrences": "1", "maxOccurrences": "UNBOUNDED"}, + {"name": "link", "capability": "tosca.capabilities.network.Linkable", "node": null, "relationship": "tosca.relationships.network.LinksTo", "minOccurrences": "1", "maxOccurrences": "UNBOUNDED"} +]; + +export const capabilitiesMock = [ + {"name": "attachment", "type": "tosca.capabilities.Attachment", "validSourceTypes": ["firstSource", "secondSource"], "minOccurrences": "0", "maxOccurrences": "UNBOUNDED"}, + {"name": "binding", "type": "tosca.capabilities.Node", "validSourceTypes": ["1source"], "minOccurrences": "1", "maxOccurrences": "UNBOUNDED"} +]; + +const requirement1: Requirement = new Requirement(); +requirement1.name = "dependency"; +requirement1.capability = "tosca.capabilities.Node"; +requirement1.node = "tosca.nodes.Root"; +requirement1.relationship = "tosca.relationships.DependsOn"; +requirement1.minOccurrences = "0"; +requirement1.maxOccurrences = "UNBOUNDED"; +const requirement2: Requirement = new Requirement(); +requirement2.name = "binding"; +requirement2.capability = "tosca.capabilities.network.Bindable"; +requirement2.node = null; +requirement2.relationship = "tosca.relationships.network.BindsTo"; +requirement2.minOccurrences = "1"; +requirement2.maxOccurrences = "UNBOUNDED"; +export const filterRequirmentsMock: Array<Requirement> = [requirement1, requirement2]; + + |