Commit 4fdf9b6d authored by Gaetan's avatar Gaetan

Test class Vehicle() --> fonction getPrice OK

parent b529581d
package tests;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import vehicle.*;
import vehicle.part.option.*;
import java.util.LinkedList;
import java.util.List;
import static org.junit.Assert.*;
public class VehicleTest {
List<Option> options = new LinkedList<>();
GPS gps = new GPS();
Aircon aircon = new Aircon();
@Before
public void setUp(){
this.options.add(gps);
this.options.add(aircon);
}
@Test
public void getPriceTest() {
double result = Vehicle.getPrice(this.options);
Assert.assertEquals(350d, result,1e-9);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment