refactoring: tests add sgErrorNotFound
This commit is contained in:
		
							parent
							
								
									1e1f8edb1f
								
							
						
					
					
						commit
						f2dd904522
					
				@ -63,6 +63,7 @@ public abstract class AbstractNotifyEntityTest extends AbstractWebTest {
 | 
			
		||||
 | 
			
		||||
    protected final String msgErrorPermission = "You don't have permission to perform this operation!";
 | 
			
		||||
    protected final String msgErrorShouldBeSpecified = "should be specified";
 | 
			
		||||
    protected final String msgErrorNotFound = "Requested item wasn't found!";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    protected void testNotifyEntityAllOneTime(HasName entity, EntityId entityId, EntityId originatorId,
 | 
			
		||||
 | 
			
		||||
@ -354,7 +354,7 @@ public abstract class BaseEntityRelationControllerTest extends AbstractControlle
 | 
			
		||||
 | 
			
		||||
        doDelete(url)
 | 
			
		||||
                .andExpect(status().isNotFound())
 | 
			
		||||
                .andExpect(statusReason(containsString("Requested item wasn't found!")));
 | 
			
		||||
                .andExpect(statusReason(containsString(msgErrorNotFound)));
 | 
			
		||||
 | 
			
		||||
        testNotifyEntityNever(mainDevice.getId(), null);
 | 
			
		||||
    }
 | 
			
		||||
@ -376,7 +376,7 @@ public abstract class BaseEntityRelationControllerTest extends AbstractControlle
 | 
			
		||||
 | 
			
		||||
        doDelete(url)
 | 
			
		||||
                .andExpect(status().isNotFound())
 | 
			
		||||
                .andExpect(statusReason(containsString("Requested item wasn't found!")));
 | 
			
		||||
                .andExpect(statusReason(containsString(msgErrorNotFound)));
 | 
			
		||||
 | 
			
		||||
        testNotifyEntityNever(mainDevice.getId(), null);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -164,7 +164,7 @@ public abstract class BaseEntityViewControllerTest extends AbstractControllerTes
 | 
			
		||||
 | 
			
		||||
        doGet("/api/tenant/entityViews?entityViewName=" + name)
 | 
			
		||||
                .andExpect(status().isNotFound())
 | 
			
		||||
                .andExpect(statusReason(containsString("Requested item wasn't found!")));
 | 
			
		||||
                .andExpect(statusReason(containsString(msgErrorNotFound)));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Test
 | 
			
		||||
 | 
			
		||||
@ -304,7 +304,8 @@ public abstract class BaseOtaPackageControllerTest extends AbstractControllerTes
 | 
			
		||||
                ActionType.DELETED, savedFirmwareInfo.getId().getId().toString());
 | 
			
		||||
 | 
			
		||||
        doGet("/api/otaPackage/info/" + savedFirmwareInfo.getId().getId().toString())
 | 
			
		||||
                .andExpect(status().isNotFound());
 | 
			
		||||
                .andExpect(status().isNotFound())
 | 
			
		||||
                .andExpect(statusReason(containsString(msgErrorNotFound)));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Test
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user