Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import static org.junit.Assert.*;
- import java.util.ArrayList;
- import org.junit.Ignore;
- import org.junit.Test;
- public class CompanyProjectTests {
- @Ignore
- public void test1() {
- //Test 8 GEt project ID
- //Testing Getting Project ID, Should be one as first project created.
- CompanyProject project = new CompanyProject();
- assertEquals(1,project.getPID());
- }
- @Ignore
- public void test2() {
- //Test 13 Get contact function
- //Testing a string that wont be in the arraylist
- CompanyProject project2 = new CompanyProject();
- assertEquals(false,project2.isContact("not an email"));
- }
- @Ignore
- public void test3() {
- //Test 14 (TEST WRONG ON PDF EXPECTED OUT COME SHOULD BE TRUE)
- //Testing a string that wont be in the arraylist
- CompanyProject project3 = new CompanyProject();
- project3.addContact("jameswilliams@gmail.com");
- assertTrue(project3.isContact("jameswilliams@gmail.com"));
- }
- @Ignore
- public void test4() {
- //Test 15
- //Already tested in test 14
- }
- @Ignore
- public void test5() {
- //Test 22 TEST NOT WORKING DONT UNDERSTAND ARRAYLISTS
- //Tests that the arraylist contains the correct emails for that phase
- // Get emails for current phase
- ArrayList<CompanyEmail> test = new ArrayList<CompanyEmail>();
- CompanyEmail email = new CompanyEmail("from@mail.caom","to@mail.com" , "subline", "message");
- CompanyProject project5 = new CompanyProject();
- project5.addEmail(email);
- //project5.addContact("jameswilliams2@gmail.com");
- //project5.addContact("jameswilliams3@gmail.com");
- test.add(email);
- //test.add("jameswilliams2@gmail.com");
- //test.add("jameswilliams3@gmail.com");
- assertEquals(test,project5.getEmailsForPhase());
- }
- @Ignore
- public void test6() {
- //Test 23 CANT DO TEST
- }
- @Ignore
- public void test7() {
- //Test 30 Get phase Name
- //getting phase name
- //Written by Matthew and Marek
- // made and object for email system to create the array of phase names to test if project had the correct phase name
- CompanyProject project7 = new CompanyProject();
- CompanyEmailSystem system = new CompanyEmailSystem();
- assertEquals(project7.getPhaseByName(),system.ProjectPhases[1]);
- }
- @Ignore
- public void test8() {
- //Test 31 Get phase Name
- //getting phase name
- //Written by Matthew and Marek
- //Done test in test 30
- }
- @Test
- public void test9() {
- //Test 34 toString Overdrive
- //tests that it corectly converts the project name and current phase to a single string.
- //Written by Matthew
- CompanyProject project9 = new CompanyProject();
- //System.out.println(project9.toString());
- assertEquals("New Project [Design]",project9.toString());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement