Skip to content
Snippets Groups Projects
Select Git revision
  • 64119975937c9bc2e4908edb7a06389c091ee248
  • main default protected
  • variant
3 results

Controller.java

Blame
  • Forked from COUETOUX Basile / FirefighterStarter
    Source project has a limited visibility.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    TestTeachingUnitResult.java 1.12 KiB
    
    public class TestTeachingUnitResult {
    	public static void main(String[] args){
    		TestTeachingUnitResult test = new TestTeachingUnitResult();
    		if(test.testgetGrade() == true)
    		    System.out.println("testGrade : correct");
    		else
    		    System.out.println("testGrade : incorrect"); 
    
    		if(test.testToString() == true)
    		    System.out.println("testToString : correct");
    		else
    		    System.out.println("testToString : incorrect");
    		
    		
    	    }
    
    	    public boolean testgetGrade(){
    	    TeachingUnitResult grade =  new TeachingUnitResult("",new Grade(12.5));
    		Grade val = grade.getGrade();
    		double val1 = val.getValue();
    		if(val1 == 12.5)
    		    return true;
    		else
    			System.out.println(val);
    			System.out.println(new Grade(12.5));
    		    return false;
    	    }
    
    	    public boolean testToString(){
    	    TeachingUnitResult teachingUnitResult = new TeachingUnitResult("Programmation 2", new Grade(13.7));
    		String teachnigUnitResultString = teachingUnitResult.toString();
    		if(teachnigUnitResultString.equals("Programmation 2 : 13.7/20"))
    		    return true;
    		else
    			System.out.println(teachnigUnitResultString);
    		    return false;
    	    }
    
    }