package com.psychic_engine.cmput301w17t10.feelsappman;

import android.test.ActivityInstrumentationTestCase2;

import java.util.Date;

/**
 * Created by jyuen1 on 2/27/17.
 */

public class MoodEventTest extends ActivityInstrumentationTestCase2 {

    public void testGetId() {
        MoodEvent moodEvent = new MoodEvent(new Mood(MoodState.Happy));
        moodEvent.setId(1);
        assertEquals(moodEvent.getId(), 1);
    }

    public void testGetMood() {
        Mood mood = new Mood(MoodState.Happy);
        MoodEvent moodEvent = new MoodEvent(mood);
        assertEquals(moodEvent.getMood(), mood);
    }
    
    public void testSetMood() {
        Mood moodHappy = newMood(MoodState.Happy);
        MoodEvent moodEvent = new MoodEvent(mood);
        assertEquals(moodEvent.getMood(), moodHappy);
        Mood moodSad = newMood(MoodState.Sad);
        moodEvent.setMood(moodSad);
        assertEquals(moodEvent.getMood(), moodSad);
    }
    
    public void testGetTrigger() {
        MoodEvent moodEvent = new MoodEvent(new Mood(MoodState.Happy));
        try {
            moodEvent.setTrigger("So happy");
            assertEquals(moodEvent.getTrigger(), "So happy");
        } catch (triggerTooLongException e){
            e.printStackTrace();
        }
    }

    public void testGetDate() {
        MoodEvent moodEvent = new MoodEvent(new Mood(MoodState.Happy));
        //Date date = new Date(2017, 02, 28);
        //moodEvent.setDate(date);
        //assertTrue(equals(moodEvent.getDate(), date));
    }

    public void testGetPicture() {
        MoodEvent moodEvent = new MoodEvent(new Mood(MoodState.Happy));
        //Photograph picture = new Picture( ... )
        //moodEvent.setPicture(picture);
        //assertEquals(equals(moodEvent.getPicture(), picture));
    }

    public void testGetLocation() {
        MoodEvent moodEvent = new MoodEvent(new Mood(MoodState.Happy));
        //Location location = new Location( ... )
        //moodEvent.setLocation(location);
        //assertEquals(equals(moodEvent.getLocation(), location));
    }
}

@@ -412,32 +412,293 @@
 tId(), 1);%0A    %7D
+%0A    %0A    public void testSetId() %7B%0A        MoodEvent moodEvent = new MoodEvent(new Mood(MoodState.Happy));%0A        moodEvent.setId(22);%0A        assertEquals(moodEvent.getId(), 22);%0A        moodEvent.setId(33);%0A        assertEquals(moodEvent.getId(), 33);%0A    %7D
 %0A%0A    public voi
@@ -1534,549 +1534,1791 @@
   %7D%0A
-%0A    public void testGetDate() %7B%0A        MoodEvent moodEvent = new MoodEvent(new Mood(MoodState.Happy));%0A        //Date date = new Date(2017, 02, 28);%0A        //moodEvent.setDate(date);%0A        //assertTrue(equals(moodEvent.getDate(), date));%0A    %7D%0A%0A    public void testGetPicture() %7B%0A        MoodEvent moodEvent = new MoodEvent(new Mood(MoodState.Happy));%0A        //Photograph picture = new Picture( ... )%0A        //moodEvent.setPicture(picture);%0A        //assertEquals(equals(moodEvent.getPicture(), picture));%0A    %7D%0A%0A    public void testG
+    %0A    public void testSetTrigger() %7B%0A        MoodEvent moodEvent = new MoodEvent(new Mood(MoodState.Happy));%0A        try %7B%0A            moodEvent.setTrigger(%22So happy%22);%0A            assertEquals(moodEvent.getTrigger(), %22So happy%22);%0A            moodEvent.setTrigger(%22angry%22);%0A            assertEquals(moodEvent.getTrigger(), %22angry%22);%0A        %7D catch (triggerTooLongException e)%7B%0A            e.printStackTrace();%0A        %7D%0A%0A    public void testGetDate() %7B%0A        MoodEvent moodEvent = new MoodEvent(new Mood(MoodState.Happy));%0A        //Date date = new Date(2017, 02, 28);%0A        //moodEvent.setDate(date);%0A        //assertTrue(equals(moodEvent.getDate(), date));%0A    %7D%0A        %0A    public void testSetDate() %7B%0A        MoodEvent moodEvent = new MoodEvent(new Mood(MoodState.Happy));%0A        //Date date = new Date(2017, 02, 28);%0A        //moodEvent.setDate(date);%0A        //assertTrue(equals(moodEvent.getDate(), date));%0A    %7D%0A%0A    public void testGetPicture() %7B%0A        MoodEvent moodEvent = new MoodEvent(new Mood(MoodState.Happy));%0A        //Photograph picture = new Picture( ... )%0A        //moodEvent.setPicture(picture);%0A        //assertEquals(equals(moodEvent.getPicture(), picture));%0A    %7D%0A        %0A    public void testSetPicture() %7B%0A        MoodEvent moodEvent = new MoodEvent(new Mood(MoodState.Happy));%0A        //Photograph picture = new Picture( ... )%0A        //moodEvent.setPicture(picture);%0A        //assertEquals(equals(moodEvent.getPicture(), picture));%0A    %7D%0A%0A    public void testGetLocation() %7B%0A        MoodEvent moodEvent = new MoodEvent(new Mood(MoodState.Happy));%0A        //Location location = new Location( ... )%0A        //moodEvent.setLocation(location);%0A        //assertEquals(equals(moodEvent.getLocation(), location));%0A    %7D%0A        %0A    public void testS
 etLo

Update MoodEventTest.java