Package jp.co.nskint.uq.pd.signage.model

Examples of jp.co.nskint.uq.pd.signage.model.Editor


            new Administrator());

        tester.param("name", NAME);
        tester.param("mail", MAIL);

        Editor editor = new Editor();
        editor.setUid(UserService.createKey(UID));
        editor.setName(NAME);
        Datastore.put(editor);

        tester.start("/editor/" + UID + "/update");
        assertThat(tester.getPage(), is(instanceOf(EditorPage.class)));
        assertThat(tester.getActionMethodName(), is("update"));
View Full Code Here


        tester.request.getSession(true).setAttribute(
            EditorPage.SESS_KEY_LOGIN_USER,
            manager);

        Editor editor = new Editor();
        editor.setUid(UserService.createKey(UID));
        editor.setName(NAME);
        editor.getManagerRef().setModel(manager);
        editor.setRegisteredDate(new Date());
        editor.setUpdatedDate(editor.getRegisteredDate());
        Datastore.put(editor);

        // 氏名未入力
        tester.param("name", "");
        tester.param("mail", MAIL);
View Full Code Here

        tester.request.getSession(true).setAttribute(
            EditorPage.SESS_KEY_LOGIN_USER,
            manager);

        Editor editor = new Editor();
        editor.setUid(UserService.createKey(UID));
        editor.setName(NAME);
        editor.getManagerRef().setModel(manager);
        editor.setRegisteredDate(new Date());
        editor.setUpdatedDate(editor.getRegisteredDate());
        Datastore.put(editor);
        // メールアドレス未入力
        tester.param("name", NAME);
        tester.param("mail", "");
View Full Code Here

        assertThat(user.getMail().getEmail(), is(mail));

        assertNotNull(user.getInitialKey());
        assertThat(user.getInitialKey(), not(""));

        Editor stored = Datastore.get(Editor.class, user.getUid());
        assertThat(stored, instanceOf(Editor.class));
        assertThat(stored.getName(), is(name));
        assertThat(stored.getMail().getEmail(), is(mail));
        assertThat(stored.getRegisteredDate(), is(stored.getUpdatedDate()));

        // パスワードを保存する
        service.savePassword(uid, "password");

        final String name2 = "Test User2";
        final String mail2 = "testuser2@mail.com";
        user = service.put(uid, name2, mail2, manager);
        assertThat(user, is(notNullValue()));
        assertThat(user, instanceOf(Editor.class));
        assertThat(user.getName(), is(name2));
        assertThat(user.getMail().getEmail(), is(mail2));

        assertThat(user.getInitialKey(), is(""));

        stored = Datastore.get(Editor.class, user.getUid());
        assertThat(stored, instanceOf(Editor.class));
        assertThat(stored.getName(), is(name2));
        assertThat(stored.getMail().getEmail(), is(mail2));
        assertTrue(stored.getRegisteredDate().before(stored.getUpdatedDate()));
    }
View Full Code Here

        assertThat(user.getMail().getEmail(), is(mail));

        assertNotNull(user.getInitialKey());
        assertThat(user.getInitialKey(), not(""));

        Editor stored = Datastore.getOrNull(Editor.class, user.getUid());
        assertThat(stored, is(nullValue()));

        tx.commit();
        stored = Datastore.getOrNull(Editor.class, user.getUid());
        assertThat(stored, instanceOf(Editor.class));
        assertThat(stored.getName(), is(name));
        assertThat(stored.getMail().getEmail(), is(mail));
        assertThat(stored.getRegisteredDate(), is(stored.getUpdatedDate()));

    }
View Full Code Here

TOP

Related Classes of jp.co.nskint.uq.pd.signage.model.Editor

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.