Bug 464

Summary: Wrong output shown for a test Case of CmdAddSlot 2
Product: Warehouse Management System Reporter: ANIRUDH <pvsatavva2-c>
Component: Testing V1Assignee: ANIRUDH <pvsatavva2-c>
Status: CONFIRMED ---    
Severity: major    
Priority: High    
Version: Specified   
Hardware: PC   
OS: Windows   

Description ANIRUDH 2020-11-25 02:38:54 HKT
Steps to Reproduce:

1. Give the command addSlot|0

Error: When input given is 0, there is a conflict between the error messages, Ivalid slot input & Volume Out of Range!!

Need to handle this error.

Given test case:


@Test //When input given is 0, there is a conflict between the error messages, Ivalid slot input & Volume Out of Range!!
	void testAddNewSlot6() {
		ByteArrayOutputStream outContent = new ByteArrayOutputStream();
	    System.setOut(new PrintStream(outContent));
	    
	    String cmdLine = "addSlot|0";
	    String [] cmdParts = cmdLine.split("\\|");
	    (new CmdAddSlot()).execute(cmdParts);

	    //String msg = "Checking when the size of the item is less than 1";
	    assertEquals("Volume Out Of Range. The size can only be (1-100).", outContent.toString().trim().substring(outContent.toString().trim().lastIndexOf('\n')+1));
	}