Examples of Talk


Examples of com.quui.chat.Talk

    /**
     * Loads the topics by initializing the Talk-Object
     */
    private void initCoreBot() {
        talk = new Talk(topicFolder, topicFile, wnLocation, logLocation);
    }
View Full Code Here

Examples of com.quui.chat.Talk

            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        @SuppressWarnings("unused")
        Talk t = new Talk("config", "topics-test.xml", p.getProperty("wn"), p
                .getProperty("log"));
        w = new WordGame();
        super.setUp();
    }
View Full Code Here

Examples of models.Talk

    public SpeakerBadgeComputerTest() {
        super(new SpeakerBadgeComputer());
    }

    private Talk createTalk(Member... speakers) {
        Talk t = new Talk();
        for (Member s : speakers) {
            t.addSpeaker(s);
        }
        return t.save();
    }
View Full Code Here

Examples of models.Talk

    }

    @Test
    public void grantedSpeaker() {
        // Member become speaker of a validated talk
        final Talk t = createTalk(member);
        assertEquals(EnumSet.noneOf(Badge.class), computer.compute(member, new BadgeComputationContext()));
        t.validate();
        assertEquals(EnumSet.of(Badge.Speaker), computer.compute(member, new BadgeComputationContext()));
    }
View Full Code Here

Examples of models.Talk

public class UpdateSessionActivityTest extends AbstractActivityTest {
   
    @Test
    public void updateSessionTalk() {
       
        Talk t = createTalk("test");
       
        // No activity for the talk
        assertEquals(0, Activity.count("session = ?", t));
        assertNull(Activity.find("session = ?", t).first());
       
        t.summary = "Un nouveau résumé";
        t.update();
       
        // Still no activity for the unvalidated talk
        assertEquals(0, Activity.count("session = ?", t));
        assertNull(Activity.find("session = ?", t).first());
       
        t.valid=true;
        t.summary = "Un nouveau nouveau résumé";
        t.update();
       
        // One activity for the session
        assertEquals(1, Activity.count("session = ?", t));
        Activity a = Activity.find("session = ?", t).first();
        assertActivity(a);
View Full Code Here

Examples of models.Talk

        test("/api/talks");
    }

    @Test
    public void testTalk() {
        Talk t = Talk.all().first();
        test("/api/talks/"+t.id);
    }
View Full Code Here

Examples of models.Talk

        List<String> errors = new ArrayList<String>();
        Map<Slot, Talk> planning = new EnumMap<Slot, Talk>(Slot.class);
        for (int i = 0; i < slots.size(); ++i) {
            if (talkIds.get(i) >= 0) {

                final Talk talk = Talk.findById(talkIds.get(i));
                if (talk == null) {
                    errors.add("Talk id " + talkIds.get(i) + " unknoww");
                } else if (planning.containsValue(talk)) {
                    errors.add("Talk " + talk + " planifié en double");
                }
View Full Code Here

Examples of models.Talk

        Planning planning = PlanedSlot.on(ConferenceEvent.CURRENT, true);
        renderJSON(planning.getSlots(), getSerializers(details));
    }

    public static void talk(long id, boolean details) {
        Talk talk = Talk.findById(id);
        notFoundIfNull(talk);
        PlanedSlot slot = PlanedSlot.forTalkOn(talk, ConferenceEvent.CURRENT);
        if (slot == null) {
            slot = new PlanedSlot(talk);
        }
View Full Code Here

Examples of models.Talk

        m.lastname = login;
        return m.save();
    }
   
    private static Talk createTalk(final String title, Member speaker, boolean valid){
        Talk t = new Talk();
        t.title = title;
        t.addSpeaker(speaker);
        t.save();
        if (valid) {
            t.validate();
        }
        return t;
    }
View Full Code Here

Examples of models.Talk

*/
public class CommentSessionActivityTest extends AbstractActivityTest {

    @Test
    public void addCommentValid() {
        Talk t = createTalk("test");
        // Ensure the talk is valid
        t.valid = true;
        t.save();
       
        // Non activity for the session
        assertEquals(0, Activity.count("session = ?", t));
       
        SessionComment c = new SessionComment(member, t, "Un commentaire");
        t.addComment(c);
        t.save();
       
        // One activity for the session
        assertEquals(1, Activity.count("session = ?", t));
        Activity a = Activity.find("session = ?", t).first();
        assertActivity(a);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.