-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
88 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,70 @@ | ||
package transmetteurs; | ||
|
||
import information.Information; | ||
import org.junit.After; | ||
import org.junit.AfterClass; | ||
import org.junit.Before; | ||
import org.junit.BeforeClass; | ||
import org.junit.Test; | ||
import static org.junit.Assert.*; | ||
|
||
/** | ||
* | ||
* @author Antoine GIRARD | ||
* @author Cédric HERZOG | ||
*/ | ||
public class TransmetteurLogiqueParfaitTest { | ||
|
||
public TransmetteurLogiqueParfaitTest() { | ||
} | ||
|
||
@BeforeClass | ||
public static void setUpClass() { | ||
} | ||
|
||
@AfterClass | ||
public static void tearDownClass() { | ||
} | ||
|
||
@Before | ||
public void setUp() { | ||
} | ||
|
||
@After | ||
public void tearDown() { | ||
} | ||
|
||
/** | ||
* Test of recevoir method, of class TransmetteurLogiqueParfait. | ||
* | ||
* @throws java.lang.Exception | ||
*/ | ||
@Test | ||
public void testRecevoir() throws Exception { | ||
System.out.println("Test recevoir"); | ||
Boolean bits[] = {true, false, true}; | ||
Information<Boolean> information = new Information<>(bits); | ||
TransmetteurLogiqueParfait instance = new TransmetteurLogiqueParfait(); | ||
instance.recevoir(information); | ||
|
||
assertEquals(instance.informationRecue, information); | ||
//Comme recevoir lance emettre cette donction est aussi testé ici. | ||
assertEquals(instance.informationEmise, information); | ||
} | ||
|
||
/** | ||
* Test of emettre method, of class TransmetteurLogiqueParfait. | ||
*/ | ||
@Test | ||
public void testEmettre() throws Exception { | ||
System.out.println("emettre"); | ||
TransmetteurLogiqueParfait instance = new TransmetteurLogiqueParfait(); | ||
instance.emettre(); | ||
assertEquals(instance.informationEmise, null); | ||
} | ||
|
||
} | ||
package transmetteurs; | ||
|
||
import destinations.DestinationFinale; | ||
import information.Information; | ||
import org.junit.After; | ||
import org.junit.AfterClass; | ||
import org.junit.Before; | ||
import org.junit.BeforeClass; | ||
import org.junit.Test; | ||
import static org.junit.Assert.*; | ||
|
||
/** | ||
* | ||
* @author Antoine GIRARD | ||
* @author Cédric HERZOG | ||
*/ | ||
public class TransmetteurLogiqueParfaitTest { | ||
|
||
public TransmetteurLogiqueParfaitTest() { | ||
} | ||
|
||
@BeforeClass | ||
public static void setUpClass() { | ||
} | ||
|
||
@AfterClass | ||
public static void tearDownClass() { | ||
} | ||
|
||
@Before | ||
public void setUp() { | ||
} | ||
|
||
@After | ||
public void tearDown() { | ||
} | ||
|
||
/** | ||
* Test of recevoir method, of class TransmetteurLogiqueParfait. | ||
* | ||
* @throws java.lang.Exception | ||
*/ | ||
@Test | ||
public void testRecevoir() throws Exception { | ||
System.out.println("Test recevoir"); | ||
Boolean bits[] = {true, false, true}; | ||
Information<Boolean> information = new Information<>(bits); | ||
TransmetteurLogiqueParfait instance = new TransmetteurLogiqueParfait(); | ||
DestinationFinale dest = new DestinationFinale(); | ||
instance.connecter(dest); | ||
instance.recevoir(information); | ||
|
||
assertEquals(instance.getInformationRecue(), information); | ||
//Comme recevoir lance emettre cette donction est aussi testé ici. | ||
assertEquals(instance.getInformationEmise(), information); | ||
assertEquals(dest.getInformationRecue(), information); | ||
} | ||
|
||
/** | ||
* Test of emettre method, of class TransmetteurLogiqueParfait. | ||
*/ | ||
@Test | ||
public void testEmettre() throws Exception { | ||
System.out.println("emettre"); | ||
TransmetteurLogiqueParfait instance = new TransmetteurLogiqueParfait(); | ||
instance.emettre(); | ||
assertEquals(instance.informationEmise, null); | ||
} | ||
|
||
} |