Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(400-rsr-1034): Add a private LNodeStatus to the SSD file #410

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,19 @@ public static TPrivate createPrivate(List<TCompasTopo> compasTopos) {
return tPrivate;
}

/**
* Create private of a given type containing a simple string as value
* @param privateType type attribute of private element to create
* @param privateValue value of private to create
* @return the complete private
*/
public static TPrivate createStringPrivate(String privateType, String privateValue) {
TPrivate tPrivate = new TPrivate();
tPrivate.setType(privateType);
tPrivate.getContent().add(privateValue);
return tPrivate;
}

/**
* Create Private of given type as parameter
* @param jaxbElement content of Private to create
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,18 @@ public static Stream<Object> createPrivateTestSources() {
new TCompasSystemVersion());
}

@Test
void createStringPrivate_should_return_new_private() {
//GIVEN
String privateType = "COMPAS-LNodeStatus";
String compasLNodeStatus = "on";
//WHEN
TPrivate result = PrivateUtils.createStringPrivate(privateType, compasLNodeStatus);
//THEN
assertThat(result.getType()).contains(privateType);
assertThat(result.getContent()).containsExactly(compasLNodeStatus);
}

@Test
void removePrivates_should_remove_privates() {
// Given : setUp
Expand Down
Loading