Package org.joda.time

Examples of org.joda.time.LocalDateTime


    public void testNormalUserPhoneCallPackageWithinLimit() {
        Map<UserField, Object> data = new HashMap<UserField, Object>();
        data.put(UserField.kUserType, UserType.kNormal);

        List<Slip> slips = new ArrayList<Slip>();
        slips.add(new Slip(SlipType.kPhoneCall, new LocalDateTime(), 60));
        data.put(UserField.kSlips, slips);

        data.put(UserField.kPackages, getPackages(PackageType.kNormalUserPhoneCall));

        UserMonthUsage usage = new UserMonthUsage(5, data);
View Full Code Here


    public void testNormalUserPhoneCallPackageOneMoreCall() {
        Map<UserField, Object> data = new HashMap<UserField, Object>();
        data.put(UserField.kUserType, UserType.kNormal);

        List<Slip> slips = new ArrayList<Slip>();
        slips.add(new Slip(SlipType.kPhoneCall, new LocalDateTime(), 61));
        data.put(UserField.kSlips, slips);

        data.put(UserField.kPackages, getPackages(PackageType.kNormalUserPhoneCall));

        UserMonthUsage usage = new UserMonthUsage(5, data);
View Full Code Here

    public void testNormalUserShortMessagePackageWithinLimit() {
        Map<UserField, Object> data = new HashMap<UserField, Object>();
        data.put(UserField.kUserType, UserType.kNormal);

        List<Slip> slips = new ArrayList<Slip>();
        slips.add(new Slip(SlipType.kShortMessage, new LocalDateTime(), 200));
        data.put(UserField.kSlips, slips);

        data.put(UserField.kPackages, getPackages(PackageType.kNormalUserShortMessage));

        UserMonthUsage usage = new UserMonthUsage(5, data);
View Full Code Here

    public void testNormalUserShortMessagePackageOneMore() {
        Map<UserField, Object> data = new HashMap<UserField, Object>();
        data.put(UserField.kUserType, UserType.kNormal);

        List<Slip> slips = new ArrayList<Slip>();
        slips.add(new Slip(SlipType.kShortMessage, new LocalDateTime(), 201));
        data.put(UserField.kSlips, slips);

        data.put(UserField.kPackages, getPackages(PackageType.kNormalUserShortMessage));

        UserMonthUsage usage = new UserMonthUsage(5, data);
View Full Code Here

    public void testNormalUserInternetPackageWithinLimit() {
        Map<UserField, Object> data = new HashMap<UserField, Object>();
        data.put(UserField.kUserType, UserType.kNormal);

        List<Slip> slips = new ArrayList<Slip>();
        slips.add(new Slip(SlipType.kInternet, new LocalDateTime(), 50 * 1000));
        data.put(UserField.kSlips, slips);

        data.put(UserField.kPackages, getPackages(PackageType.kNormalUserInternet));

        UserMonthUsage usage = new UserMonthUsage(5, data);
View Full Code Here

    public void testNormalUserInternetPackage50kMore() {
        Map<UserField, Object> data = new HashMap<UserField, Object>();
        data.put(UserField.kUserType, UserType.kNormal);

        List<Slip> slips = new ArrayList<Slip>();
        slips.add(new Slip(SlipType.kInternet, new LocalDateTime(), 50 * 1000 + 50));
        data.put(UserField.kSlips, slips);

        data.put(UserField.kPackages, getPackages(PackageType.kNormalUserInternet));

        UserMonthUsage usage = new UserMonthUsage(5, data);
View Full Code Here

    public void testNormalUserAllPackagesActivitiesWithInLimit() {
        Map<UserField, Object> data = new HashMap<UserField, Object>();
        data.put(UserField.kUserType, UserType.kNormal);

        List<Slip> slips = new ArrayList<Slip>();
        slips.add(new Slip(SlipType.kPhoneCall, new LocalDateTime(), 60));
        slips.add(new Slip(SlipType.kShortMessage, new LocalDateTime(), 200));
        slips.add(new Slip(SlipType.kInternet, new LocalDateTime(), 50 * 1000));
        data.put(UserField.kSlips, slips);

        data.put(UserField.kPackages, getPackages(PackageType.kNormalUserPhoneCall,
                PackageType.kNormalUserShortMessage, PackageType.kNormalUserInternet));

View Full Code Here

    public void testNormalUserAllPackagesActivitiesExceedInLimit() {
        Map<UserField, Object> data = new HashMap<UserField, Object>();
        data.put(UserField.kUserType, UserType.kNormal);

        List<Slip> slips = new ArrayList<Slip>();
        slips.add(new Slip(SlipType.kPhoneCall, new LocalDateTime(), 61));
        slips.add(new Slip(SlipType.kShortMessage, new LocalDateTime(), 210));
        slips.add(new Slip(SlipType.kInternet, new LocalDateTime(), 50 * 1000 + 50));
        data.put(UserField.kSlips, slips);

        data.put(UserField.kPackages, getPackages(PackageType.kNormalUserPhoneCall,
                PackageType.kNormalUserShortMessage, PackageType.kNormalUserInternet));

View Full Code Here

    public void testNormalUserNewJoinWithInLimit() {
        Map<UserField, Object> data = new HashMap<UserField, Object>();
        data.put(UserField.kUserType, UserType.kNormal);

        List<Slip> slips = new ArrayList<Slip>();
        slips.add(new Slip(SlipType.kPhoneCall, new LocalDateTime(), 60));
        slips.add(new Slip(SlipType.kShortMessage, new LocalDateTime(), 200));
        slips.add(new Slip(SlipType.kInternet, new LocalDateTime(), 50 * 1000));
        data.put(UserField.kSlips, slips);

        data.put(UserField.kIsNewUser, true);

        UserMonthUsage usage = new UserMonthUsage(5, data);
View Full Code Here

    public void testVipUserNoPackageOneCall() {
        Map<UserField, Object> data = new HashMap<UserField, Object>();
        data.put(UserField.kUserType, UserType.kVip);
        data.put(UserField.kDaysServed, 30);
        List<Slip> slips = new ArrayList<Slip>();
        slips.add(new Slip(SlipType.kPhoneCall, new LocalDateTime(), 1));
        data.put(UserField.kSlips, slips);
        UserMonthUsage usage = new UserMonthUsage(1, data);
        assertEquals(Money.get(60, 40), calculator.calculate(usage));
    }
View Full Code Here

TOP

Related Classes of org.joda.time.LocalDateTime

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.