Commit 2422f4d8 authored by dietricf's avatar dietricf
Browse files

SONARWORK

parent 616e7c4d
......@@ -15,6 +15,7 @@
package org.eclipse.openk.gridfailureinformation.bpmn.impl;
import org.eclipse.openk.gridfailureinformation.support.MockDataHelper;
import org.eclipse.openk.gridfailureinformation.viewmodel.FailureInformationDto;
import org.junit.jupiter.api.Test;
......@@ -23,7 +24,14 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
public class GfiProcessSubjectTest {
@Test
public void testSubjectCreation() {
GfiProcessSubject sub = GfiProcessSubject.of(new FailureInformationDto(), "whoami");
FailureInformationDto obj = MockDataHelper.mockGridFailureInformationDto();
obj.setResponsibility("me");
GfiProcessSubject sub = GfiProcessSubject.of(obj, "whoami");
sub.setJwt("jwt");
sub.setStateInDb(GfiProcessState.APPLIED);
assertEquals( "whoami", sub.getChangeUser());
assertEquals( "jwt", sub.getJwt() );
assertEquals(GfiProcessState.APPLIED, sub.getStateInDb());
assertEquals("me", sub.getFailureInformationDto().getResponsibility());
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment