Skip to content

Commit

Permalink
added test for added condition.
Browse files Browse the repository at this point in the history
  • Loading branch information
eneskuluk committed Apr 13, 2021
1 parent 2b4f965 commit 5efd0b5
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2192,7 +2192,7 @@ public void testAddIPCameraViaCreateBroadcast()

@Test
public void testAddIPCamera() {

BroadcastRestService restService = Mockito.spy(restServiceReal);
Result result = new Result(false);

Broadcast newCam = new Broadcast("testAddIPCamera", "10.2.40.64:8080", "admin", "admin",
Expand Down Expand Up @@ -2269,6 +2269,12 @@ public void testAddIPCamera() {

//should be true because load is below limit
assertTrue(result.isSuccess());

Broadcast noSpecifiedType = new Broadcast("testAddIPCamera");
result=streamSourceRest.addStreamSource(noSpecifiedType,"");
//should be true since it wouldn't return true because there is no ip camera or stream source defined in the declaration.
assertFalse(result.isSuccess());
assertEquals("Auto start query needs an IP camera or stream source.",result.getMessage() );

}

Expand Down

0 comments on commit 5efd0b5

Please sign in to comment.