Skip to content

Commit

Permalink
add unit test for getEtag and setEtag in ZoweUSSNode
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandru-Paul Dumitru <alexandru.dumitru@broadcom.com>
  • Loading branch information
Alexandru-Paul Dumitru committed Dec 4, 2019
1 parent 6b94c23 commit c55603b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions __tests__/__unit__/ZoweUSSNode.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,22 @@ describe("Unit Tests (Jest)", () => {
utils.labelHack(rootNode);
expect(rootNode.label === "gappy");
});

/*************************************************************************************************************
* Checks that getEtag() returns a value
*************************************************************************************************************/
it("Checks that getEtag() returns a value", async () => {
const rootNode = new ZoweUSSNode("gappy", vscode.TreeItemCollapsibleState.Collapsed, null, session, null, null, null, "123");
expect(rootNode.getEtag() === "123");
});

/*************************************************************************************************************
* Checks that setEtag() assigns a value
*************************************************************************************************************/
it("Checks that setEtag() assigns a value", async () => {
const rootNode = new ZoweUSSNode("gappy", vscode.TreeItemCollapsibleState.Collapsed, null, session, null, null, null, "123");
expect(rootNode.getEtag() === "123");
rootNode.setEtag("ABC");
expect(rootNode.getEtag() === "ABC");
});
});

0 comments on commit c55603b

Please sign in to comment.