Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

labo00 Guillaume Blanco #53

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public String getMessage() {
}

public int add(int a, int b) {
return a * b;
return a + b;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ch.heigvd.res.lab00;

/**
*
* @author GuillaumeBlanco
*/
public class Flute implements IInstrument{



public int getSoundVolume(){
return 5;
}

public String getColor(){
return "grey";
}

public String play(){
return "tut";
}




}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ch.heigvd.res.lab00;

/**
*
* @author GuillaumeBlanco
*/
public interface IInstrument {

public int getSoundVolume();

public String getColor();

public String play();



}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ch.heigvd.res.lab00;

/**
*
* @author GuillaumeBlanco
*/
public class Trumpet implements IInstrument{


public int getSoundVolume(){
return 10;
}

public String getColor(){
return "golden";
}

public String play(){
return "pouet";
}




}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
public class TrumpetTest {

/*

@Test
public void thereShouldBeAnIInstrumentInterfaceAndATrumpetClass() {
IInstrument trumpet = new Trumpet();
Expand Down Expand Up @@ -51,6 +51,6 @@ public void aTrumpetShouldBeGolden() {
String color = trumpet.getColor();
Assert.assertEquals("golden", color);
}
*/


}
2 changes: 1 addition & 1 deletion Lab00App-build/Lab00App-tests/test-results.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"ignoreCount":0,"failures":[{"message":"expected:<42> but was:<80>","exception":{"cause":null,"stackTrace":[{"methodName":"fail","fileName":"Assert.java","lineNumber":88,"className":"org.junit.Assert","nativeMethod":false},{"methodName":"failNotEquals","fileName":"Assert.java","lineNumber":834,"className":"org.junit.Assert","nativeMethod":false},{"methodName":"assertEquals","fileName":"Assert.java","lineNumber":645,"className":"org.junit.Assert","nativeMethod":false},{"methodName":"assertEquals","fileName":"Assert.java","lineNumber":631,"className":"org.junit.Assert","nativeMethod":false},{"methodName":"thereShouldBeAMethodToAddIntegers","fileName":"ApplicationTest.java","lineNumber":53,"className":"ch.heigvd.res.lab00.ApplicationTest","nativeMethod":false},{"methodName":"invoke0","fileName":"NativeMethodAccessorImpl.java","lineNumber":-2,"className":"sun.reflect.NativeMethodAccessorImpl","nativeMethod":true},{"methodName":"invoke","fileName":"NativeMethodAccessorImpl.java","lineNumber":62,"className":"sun.reflect.NativeMethodAccessorImpl","nativeMethod":false},{"methodName":"invoke","fileName":"DelegatingMethodAccessorImpl.java","lineNumber":43,"className":"sun.reflect.DelegatingMethodAccessorImpl","nativeMethod":false},{"methodName":"invoke","fileName":"Method.java","lineNumber":497,"className":"java.lang.reflect.Method","nativeMethod":false},{"methodName":"runReflectiveCall","fileName":"FrameworkMethod.java","lineNumber":50,"className":"org.junit.runners.model.FrameworkMethod$1","nativeMethod":false},{"methodName":"run","fileName":"ReflectiveCallable.java","lineNumber":12,"className":"org.junit.internal.runners.model.ReflectiveCallable","nativeMethod":false},{"methodName":"invokeExplosively","fileName":"FrameworkMethod.java","lineNumber":47,"className":"org.junit.runners.model.FrameworkMethod","nativeMethod":false},{"methodName":"evaluate","fileName":"InvokeMethod.java","lineNumber":17,"className":"org.junit.internal.runners.statements.InvokeMethod","nativeMethod":false},{"methodName":"runLeaf","fileName":"ParentRunner.java","lineNumber":325,"className":"org.junit.runners.ParentRunner","nativeMethod":false},{"methodName":"runChild","fileName":"BlockJUnit4ClassRunner.java","lineNumber":78,"className":"org.junit.runners.BlockJUnit4ClassRunner","nativeMethod":false},{"methodName":"runChild","fileName":"BlockJUnit4ClassRunner.java","lineNumber":57,"className":"org.junit.runners.BlockJUnit4ClassRunner","nativeMethod":false},{"methodName":"run","fileName":"ParentRunner.java","lineNumber":290,"className":"org.junit.runners.ParentRunner$3","nativeMethod":false},{"methodName":"schedule","fileName":"ParentRunner.java","lineNumber":71,"className":"org.junit.runners.ParentRunner$1","nativeMethod":false},{"methodName":"runChildren","fileName":"ParentRunner.java","lineNumber":288,"className":"org.junit.runners.ParentRunner","nativeMethod":false},{"methodName":"access$000","fileName":"ParentRunner.java","lineNumber":58,"className":"org.junit.runners.ParentRunner","nativeMethod":false},{"methodName":"evaluate","fileName":"ParentRunner.java","lineNumber":268,"className":"org.junit.runners.ParentRunner$2","nativeMethod":false},{"methodName":"run","fileName":"ParentRunner.java","lineNumber":363,"className":"org.junit.runners.ParentRunner","nativeMethod":false},{"methodName":"execute","fileName":"JUnit4Provider.java","lineNumber":264,"className":"org.apache.maven.surefire.junit4.JUnit4Provider","nativeMethod":false},{"methodName":"executeTestSet","fileName":"JUnit4Provider.java","lineNumber":153,"className":"org.apache.maven.surefire.junit4.JUnit4Provider","nativeMethod":false},{"methodName":"invoke","fileName":"JUnit4Provider.java","lineNumber":124,"className":"org.apache.maven.surefire.junit4.JUnit4Provider","nativeMethod":false},{"methodName":"invokeProviderInSameClassLoader","fileName":"ForkedBooter.java","lineNumber":200,"className":"org.apache.maven.surefire.booter.ForkedBooter","nativeMethod":false},{"methodName":"runSuitesInProcess","fileName":"ForkedBooter.java","lineNumber":153,"className":"org.apache.maven.surefire.booter.ForkedBooter","nativeMethod":false},{"methodName":"main","fileName":"ForkedBooter.java","lineNumber":103,"className":"org.apache.maven.surefire.booter.ForkedBooter","nativeMethod":false}],"message":"expected:<42> but was:<80>","localizedMessage":"expected:<42> but was:<80>","suppressed":[]},"trace":"java.lang.AssertionError: expected:<42> but was:<80>\n\tat org.junit.Assert.fail(Assert.java:88)\n\tat org.junit.Assert.failNotEquals(Assert.java:834)\n\tat org.junit.Assert.assertEquals(Assert.java:645)\n\tat org.junit.Assert.assertEquals(Assert.java:631)\n\tat ch.heigvd.res.lab00.ApplicationTest.thereShouldBeAMethodToAddIntegers(ApplicationTest.java:53)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:497)\n\tat org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)\n\tat org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)\n\tat org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)\n\tat org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)\n\tat org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)\n\tat org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)\n\tat org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)\n\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)\n\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)\n\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)\n\tat org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)\n\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:363)\n\tat org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)\n\tat org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)\n\tat org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)\n\tat org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)\n\tat org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)\n\tat org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)\n","testHeader":"thereShouldBeAMethodToAddIntegers(ch.heigvd.res.lab00.ApplicationTest)","description":{"empty":false,"annotations":[{}],"className":"ch.heigvd.res.lab00.ApplicationTest","methodName":"thereShouldBeAMethodToAddIntegers","displayName":"thereShouldBeAMethodToAddIntegers(ch.heigvd.res.lab00.ApplicationTest)","testClass":"ch.heigvd.res.lab00.ApplicationTest","suite":false,"test":true,"children":[]}}],"runTime":97,"runCount":5,"failureCount":1}
{"ignoreCount":0,"failures":[],"runTime":39,"failureCount":0,"runCount":5}