Package com.infoclinika.mssharing.model

Examples of com.infoclinika.mssharing.model.Notifier


    public void testUserReceivesEmailOnProjectSharingDirectly() {
        final long bob = uc.createLab3AndBob();
        final long poll = uc.createPaul();
        final String projName = anyStr();
        final long proj = studyManagement.newProject(bob, uc.getLab3(), new StudyManagement.ProjectInfo(projName, anyStr(), anyStr()));
        final Notifier notifier = notificator();

        sharingManagement.updateSharingPolicy(bob, proj, ImmutableMap.of(poll, SharingManagement.AccessLevel.WRITE), emptySharing, true);

        verify(notifier).projectShared(eq(bob), eq(poll), eq(proj));
    }
View Full Code Here


    public void testUserReceivesEmailOnProjectSharingThrowGroup() {
        final long bob = uc.createLab3AndBob();
        final long poll = uc.createPaul();
        final String projName = anyStr();
        final long proj = studyManagement.newProject(bob, uc.getLab3(), new StudyManagement.ProjectInfo(projName, anyStr(), anyStr()));
        final Notifier notifier = notificator();
        final long group = sharingManagement.createGroup(bob, anyStr(), ImmutableSet.of(poll));

        sharingManagement.updateSharingPolicy(bob, proj, emptySharing, ImmutableMap.of(group, SharingManagement.AccessLevel.WRITE), true);

        verify(notifier).projectShared(eq(bob), eq(poll), eq(proj));
View Full Code Here

    public void testUserReceivesEmailOnProjectSharingThrowGroupEditing() {
        final long bob = uc.createLab3AndBob();
        final long paul = uc.createPaul();
        final String projName = anyStr();
        final long proj = studyManagement.newProject(bob, uc.getLab3(), new StudyManagement.ProjectInfo(projName, anyStr(), anyStr()));
        final Notifier notifier = notificator();
        final long group = sharingManagement.createGroup(bob, anyStr(), ImmutableSet.of(paul));
        sharingManagement.updateSharingPolicy(bob, proj, emptySharing, ImmutableMap.of(group, SharingManagement.AccessLevel.WRITE), true);

        sharingManagement.setCollaborators(bob, group, ImmutableSet.of(paul), true);
View Full Code Here

    public void testUserDontReceiveEmailOnProjectSharingThroughGroupEditingIfItWasMarked() {
        final long bob = uc.createLab3AndBob();
        final long paul = uc.createPaul();
        final String projName = anyStr();
        final long proj = studyManagement.newProject(bob, uc.getLab3(), new StudyManagement.ProjectInfo(projName, anyStr(), anyStr()));
        final Notifier notifier = notificator();
        final long group = sharingManagement.createGroup(bob, anyStr(), ImmutableSet.of(paul));
        sharingManagement.updateSharingPolicy(bob, proj, emptySharing, ImmutableMap.of(group, SharingManagement.AccessLevel.WRITE), false);

        sharingManagement.setCollaborators(bob, group, ImmutableSet.of(paul), false);
View Full Code Here

    @Test
    public void testUserDontReceivesEmailOnProjectSharingIfItsWasNotSpecified() {
        final long bob = uc.createLab3AndBob();
        final long poll = uc.createPaul();
        final long proj = uc.createProject(bob, uc.getLab3());
        final Notifier notifier = notificator();

        sharingManagement.updateSharingPolicy(bob, proj, ImmutableMap.of(poll, SharingManagement.AccessLevel.WRITE), emptySharing, false);

        verify(notifier, never()).projectShared(anyLong(), anyLong(), anyLong());
    }
View Full Code Here

                return approveUrl;
            }
        };

        userManagement.updatePersonAndSendEmail(john, new UserManagement.PersonInfo("Joe", "J", "jjj@j.com"), ImmutableSet.of(uc.getLab3()), urlProvider);
        Notifier notifier = notificator();
        verify(notifier).sendLabMembershipRequest(eq(labHead), Matchers.any(String.class), eq(john), eq(approveUrl), Matchers.any(String.class));

        assertEquals(repo.findPendingByUser(john).size(), 1);       //one request
    }
View Full Code Here

TOP

Related Classes of com.infoclinika.mssharing.model.Notifier

Copyright © 2018 www.massapicom. 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.