package com.orange.oss.cloudfoundry.cscpi.logic;

import org.junit.Test;
import static org.junit.Assert.*;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@RunWith(JUnit4.class)
public class TestDriveCalculation {

	private static Logger logger=LoggerFactory.getLogger(TestDriveCalculation.class.getName());
	
	@Test
	public void calculateDrivePath(){
		int deviceid=3;
		int driveIndex=deviceid-1;
		char drive=(char) ('a'+driveIndex);
	    String path="/dev/xvd"+drive;
	    
	    assertEquals("/dev/xvdc", path);

	}
}

@@ -440,9 +440,9 @@
 eid=
-3
+2
 ;%0A%09%09
@@ -468,10 +468,8 @@
 ceid
--1
 ;%0A%09%09

fix device calculation test