Package org.joda.time

Examples of org.joda.time.DateTime.plusMinutes()


                        is( 4L ) );
            assertThat( count( timeline.getRecords( now.getMillis() + 100, now.plusMinutes( 5 ).getMillis() ) ),
                        is( 5L ) );

            // Queries returning mixed past and future records
            assertThat( count( timeline.getRecords( start.getMillis(), now.plusMinutes( 5 ).getMillis() ) ),
                        is( 7L ) );
        }
    }

    @Test
View Full Code Here


            callbackHandler.setStatement(SAML2CallbackHandler.Statement.AUTHN);
            callbackHandler.setIssuer("www.example.com");

            ConditionsBean conditions = new ConditionsBean();
            DateTime notBefore = new DateTime();
            conditions.setNotBefore(notBefore.plusMinutes(2));
            conditions.setNotAfter(notBefore.plusMinutes(5));
            callbackHandler.setConditions(conditions);

            InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
            String action = WSHandlerConstants.SAML_TOKEN_SIGNED;
View Full Code Here

            callbackHandler.setIssuer("www.example.com");

            ConditionsBean conditions = new ConditionsBean();
            DateTime notBefore = new DateTime();
            conditions.setNotBefore(notBefore.plusMinutes(2));
            conditions.setNotAfter(notBefore.plusMinutes(5));
            callbackHandler.setConditions(conditions);

            InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
            String action = WSHandlerConstants.SAML_TOKEN_SIGNED;
            Properties properties = new Properties();
View Full Code Here

            callbackHandler.setIssuer("www.example.com");

            ConditionsBean conditions = new ConditionsBean();
            DateTime notBefore = new DateTime();
            conditions.setNotBefore(notBefore.plusSeconds(30));
            conditions.setNotAfter(notBefore.plusMinutes(5));
            callbackHandler.setConditions(conditions);

            InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
            String action = WSHandlerConstants.SAML_TOKEN_SIGNED;
            Properties properties = new Properties();
View Full Code Here

        datetime = datetime.minusDays(3);
        Nicolive nicolinve1 = new Nicolive();
        nicolinve1.setTitle("テスト");
        nicolinve1.setDescription(new Text("本日は晴天なり。"));
        nicolinve1.setOpenTime(datetime.toDate());
        nicolinve1.setStartTime(datetime.plusMinutes(10).toDate());
        nicolinve1.setLink(new Link("http://ryu22e.org/1"));
        Key key1 = Datastore.put(nicolinve1);
        testDataKeys.add(key1);
        Nicolive nicolinve2 = new Nicolive();
        nicolinve2.setTitle("テスト");
View Full Code Here

        testDataKeys.add(key1);
        Nicolive nicolinve2 = new Nicolive();
        nicolinve2.setTitle("テスト");
        nicolinve2.setDescription(new Text("本日は晴天なり。"));
        nicolinve2.setOpenTime(datetime.toDate());
        nicolinve2.setStartTime(datetime.plusMinutes(10).toDate());
        nicolinve2.setLink(new Link("http://ryu22e.org/2"));
        Key key2 = Datastore.put(nicolinve2);
        testDataKeys.add(key2);
        NicoliveIndex nicoliveIndex = new NicoliveIndex();
        nicoliveIndex.setKeyword("テスト");
View Full Code Here

            SAMLObjectBuilder<Conditions> conditionsV2Builder =
                    (SAMLObjectBuilder<Conditions>) builderFactory.getBuilder(Conditions.DEFAULT_ELEMENT_NAME);
            Conditions conditions = conditionsV2Builder.buildObject();
            DateTime newNotBefore = new DateTime();
            conditions.setNotBefore(newNotBefore);
            conditions.setNotOnOrAfter(newNotBefore.plusMinutes(5));

            XMLObjectBuilder<XSAny> xsAnyBuilder = builderFactory.getBuilder(XSAny.TYPE_NAME);
            XSAny attributeValue = xsAnyBuilder.buildObject(AttributeValue.DEFAULT_ELEMENT_NAME);
            attributeValue.getUnknownXMLObjects().add(conditions);
View Full Code Here

        Conditions conditions = conditionsV1Builder.buildObject();
       
        if (conditionsBean == null) {
            DateTime newNotBefore = new DateTime();
            conditions.setNotBefore(newNotBefore);
            conditions.setNotOnOrAfter(newNotBefore.plusMinutes(5));
            return conditions;
        }
       
        long tokenPeriodSeconds = conditionsBean.getTokenPeriodSeconds();
        DateTime notBefore = conditionsBean.getNotBefore();
View Full Code Here

        Conditions conditions = conditionsBuilder.buildObject();
       
        if (conditionsBean == null) {
            DateTime newNotBefore = new DateTime();
            conditions.setNotBefore(newNotBefore);
            conditions.setNotOnOrAfter(newNotBefore.plusMinutes(5));
            return conditions;
        }
       
        long tokenPeriodSeconds = conditionsBean.getTokenPeriodSeconds();
        DateTime notBefore = conditionsBean.getNotBefore();
View Full Code Here

    pigValueRangeTest("junitTypeTest1", "date", "datetime", null, d.toString(),
      d.toString(FORMAT_4_DATE), FORMAT_4_DATE);
    pigValueRangeTestOverflow("junitTypeTest2", "date", "datetime", HCatBaseStorer.OOR_VALUE_OPT_VALUES.Null,
      d.plusHours(2).toString(), FORMAT_4_DATE);//time != 0
    pigValueRangeTestOverflow("junitTypeTest3", "date", "datetime", HCatBaseStorer.OOR_VALUE_OPT_VALUES.Throw,
      d.plusMinutes(1).toString(), FORMAT_4_DATE);//time != 0
    d = new DateTime(1991,10,11,0,0,DateTimeZone.forOffsetHours(-11));
    pigValueRangeTest("junitTypeTest4", "date", "datetime", null, d.toString(),
      d.toString(FORMAT_4_DATE), FORMAT_4_DATE);
    pigValueRangeTestOverflow("junitTypeTest5", "date", "datetime", HCatBaseStorer.OOR_VALUE_OPT_VALUES.Null,
      d.plusHours(2).toString(), FORMAT_4_DATE);//date out of range due to time != 0
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.