Advertisement
moreiramota

Untitled

Dec 16th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.73 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package lapr.project.model;
  7.  
  8. import org.junit.After;
  9. import org.junit.AfterClass;
  10. import org.junit.Before;
  11. import org.junit.BeforeClass;
  12.  
  13. import static org.junit.jupiter.api.Assertions.assertEquals;
  14.  
  15. import org.junit.jupiter.api.Test;
  16.  
  17. /**
  18. *
  19. * @author joaoflores
  20. */
  21. public class EBicycleTest {
  22.  
  23. public EBicycleTest() {
  24. }
  25.  
  26. @BeforeClass
  27. public static void setUpClass() {
  28. }
  29.  
  30. @AfterClass
  31. public static void tearDownClass() {
  32. }
  33.  
  34. @Before
  35. public void setUp() {
  36. }
  37.  
  38. @After
  39. public void tearDown() {
  40. }
  41.  
  42. /**
  43. * Test of getTension method, of class EBicycle.
  44. */
  45. @Test
  46. public void testGetTension() {
  47. System.out.println("getTension");
  48. float x = 2;
  49. EBicycle instance = new EBicycle(1, 1, "y", 20, 400, 350, 560);
  50. float expResult = 2;
  51. instance.setTension(x);
  52. float result = instance.getTension();
  53. assertEquals(expResult, result);
  54.  
  55. }
  56.  
  57. /**
  58. * Test of getBattery_capacity method, of class EBicycle.
  59. */
  60. @Test
  61. public void testGetBattery_capacity() {
  62. System.out.println("getBattery_capacity");
  63. float x = 3;
  64. EBicycle instance = new EBicycle(1, 1, "y", 20, 400, 350, 560);
  65. float expResult = 3;
  66. instance.setBattery_capacity(x);
  67. float result = instance.getBattery_capacity();
  68. assertEquals(expResult, result);
  69.  
  70. }
  71.  
  72. /**
  73. * Test of getBattery_remain method, of class EBicycle.
  74. */
  75. @Test
  76. public void testGetBattery_remain() {
  77. System.out.println("getBattery_remain");
  78. float x = 3;
  79. EBicycle instance = new EBicycle(1, 1, "y", 20, 400, 350, 560);
  80. float expResult = 3;
  81. instance.setBattery_remain(x);
  82. float result = instance.getBattery_remain();
  83. assertEquals(expResult, result);
  84.  
  85. }
  86.  
  87. /**
  88. * Test of getMotor_power method, of class EBicycle.
  89. */
  90. @Test
  91. public void testGetMotor_power() {
  92. System.out.println("getMotor_power");
  93. float x = 3;
  94. EBicycle instance = new EBicycle(1, 1, "y", 20, 400, 350, 560);
  95. instance.setMotor_power(x);
  96. float expResult = 3;
  97. float result = instance.getMotor_power();
  98. assertEquals(expResult, result);
  99.  
  100. }
  101.  
  102. /**
  103. * Test of getId_bicycle method, of class EBicycle.
  104. */
  105. @Test
  106. public void testGetId_bicycle() {
  107. System.out.println("getId_bicycle");
  108. int x = 3;
  109. EBicycle instance = new EBicycle(1, 1, "y", 20, 400, 350, 560);
  110. instance.setIdBicycle(x);
  111. int expResult = 3;
  112. int result = instance.getId_bicycle();
  113. assertEquals(expResult, result);
  114.  
  115. }
  116.  
  117. /**
  118. * Test of getType method, of class EBicycle.
  119. */
  120. @Test
  121. public void testGetType() {
  122. System.out.println("getType");
  123. int x = 3;
  124. EBicycle instance = new EBicycle(1, 1, "y", 20, 400, 350, 560);
  125. instance.setType(x);
  126. int expResult = 3;
  127. int result = instance.getType();
  128. assertEquals(expResult, result);
  129.  
  130. }
  131.  
  132. /**
  133. * Test of getAvailable method, of class EBicycle.
  134. */
  135. @Test
  136. public void testGetAvailable() {
  137. System.out.println("getAvailable");
  138. String x = "N";
  139. EBicycle instance = new EBicycle(1, 1, "y", 20, 400, 350, 560);
  140. instance.setAvailable(x);
  141. String expResult = "N";
  142. String result = instance.getAvailable();
  143. assertEquals(expResult, result);
  144.  
  145. }
  146.  
  147. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement