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

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


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

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

        Administrator stored = Datastore.get(Administrator.class, user.getUid());
        assertThat(stored, instanceOf(Administrator.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);
        assertThat(user, is(notNullValue()));
        assertThat(user, instanceOf(Administrator.class));
        assertThat(user.getName(), is(name2));
        assertThat(user.getMail().getEmail(), is(mail2));

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

        stored = Datastore.get(Administrator.class, user.getUid());
        assertThat(stored, instanceOf(Administrator.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(""));

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

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

    }
View Full Code Here

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

        Administrator user = Datastore.get(Administrator.class, UserService.createKey(uid));
        assertThat(user.getPassword(), is(password));
        assertThat(user.getInitialKey(), is(""));
    }
View Full Code Here

        final String uid = UID;
        final String name = "Test User";
        final String mail = "testuser@mail.com";
        User user = service.put(uid, name, mail);

        Administrator stored = Datastore.getOrNull(Administrator.class, user.getUid());
        assertThat(stored, is(notNullValue()));

        // 削除
        service.delete(UID);
View Full Code Here

TOP

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

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.