Пример #1
0
func (s *ComplexGroupSuite) TestGetDateTimeComplex(c *chk.C) {
	res, err := complexPrimitiveClient.GetDateTime()
	c.Assert(err, chk.IsNil)

	c.Assert(*res.Field, chk.DeepEquals, utils.ToDateTime("0001-01-01T00:00:00Z"))
	c.Assert(*res.Now, chk.DeepEquals, utils.ToDateTime("2015-05-18T18:38:00Z"))
}
Пример #2
0
func (s *URLSuite) TestPathDateTimeValid(c *chk.C) {
	_, err := pathClient.DateTimeValid(utils.ToDateTime("2012-01-01T01:01:01Z"))
	c.Assert(err, chk.IsNil)
}
Пример #3
0
// dont why not working
func (s *URLSuite) TestQueryDateTimeValid(c *chk.C) {
	dt := utils.ToDateTime("2012-01-01T01:01:01Z")
	_, err := queryClient.DateTimeValid(dt)
	c.Assert(err, chk.IsNil)
}
Пример #4
0
func (s *ComplexGroupSuite) TestPutDateTimeComplex(c *chk.C) {
	dt1, dt2 := utils.ToDateTime("0001-01-01T00:00:00Z"), utils.ToDateTime("2015-05-18T18:38:00Z")
	_, err := complexPrimitiveClient.PutDateTime(DatetimeWrapper{Field: &dt1, Now: &dt2})
	c.Assert(err, chk.IsNil)
}
Пример #5
0
func (s *DateTimeGroupSuite) TestGetUtcLowercaseMaxDateTime(c *chk.C) {
	ti, err := datetimeClient.GetUtcLowercaseMaxDateTime()
	c.Assert(err, chk.IsNil)
	c.Assert(*ti.Value, chk.DeepEquals, utils.ToDateTime("9999-12-31T23:59:59.9999999Z"))
}
Пример #6
0
func (s *DateTimeGroupSuite) TestGetUtcMinDateTime(c *chk.C) {
	ti, err := datetimeClient.GetUtcMinDateTime()
	c.Assert(err, chk.IsNil)
	c.Assert(*ti.Value, chk.DeepEquals, utils.ToDateTime("0001-01-01T00:00:00Z"))
}
Пример #7
0
func (s *DateTimeGroupSuite) TestGetLocalPositiveOffsetUppercaseMaxDateTime(c *chk.C) {
	ti, err := datetimeClient.GetLocalPositiveOffsetUppercaseMaxDateTime()
	c.Assert(err, chk.IsNil)
	c.Assert(*ti.Value, chk.DeepEquals, utils.ToDateTime("9999-12-31T23:59:59.9999999+14:00"))
}
Пример #8
0
func (s *DateTimeGroupSuite) TestGetOverflow(c *chk.C) {
	ti, err := datetimeClient.GetOverflow()
	c.Assert(err, chk.IsNil)
	c.Assert(*ti.Value, chk.DeepEquals, utils.ToDateTime("9999-12-31T23:59:59.9999999-14:00"))
}
Пример #9
0
func (s *DateTimeGroupSuite) TestPutUtcMinDateTime(c *chk.C) {
	dt := utils.ToDateTime("0001-01-01T00:00:00Z")
	_, err := datetimeClient.PutUtcMinDateTime(dt)
	c.Assert(err, chk.IsNil)
}
Пример #10
0
func (s *DateTimeGroupSuite) TestGetLocalPositiveOffsetMinDateTime(c *chk.C) {
	ti, err := datetimeClient.GetLocalPositiveOffsetMinDateTime()
	c.Assert(err, chk.IsNil)
	c.Assert(*ti.Value, chk.DeepEquals, utils.ToDateTime("0001-01-01T00:00:00+14:00"))
}
Пример #11
0
func (s *DateTimeGroupSuite) TestPutUtcMaxDateTime(c *chk.C) {
	dt := utils.ToDateTime("9999-12-31T23:59:59.9999999Z")
	_, err := datetimeClient.PutUtcMaxDateTime(dt)
	c.Assert(err, chk.IsNil)
}
Пример #12
0
func (s *DateTimeGroupSuite) TestPutLocalPositiveOffsetMinDateTime(c *chk.C) {
	dt := utils.ToDateTime("0001-01-01T00:00:00+14:00")
	_, err := datetimeClient.PutLocalPositiveOffsetMinDateTime(dt)
	c.Assert(err, chk.IsNil)
}
Пример #13
0
func (s *DateTimeGroupSuite) TestPutLocalPositiveOffsetMaxDateTime(c *chk.C) {
	dt := utils.ToDateTime("9999-12-31T23:59:59.9999999+14:00")
	_, err := datetimeClient.PutLocalPositiveOffsetMaxDateTime(dt)
	c.Assert(err, chk.IsNil)
}
Пример #14
0
func (s *HeaderSuite) TestHeaderParamDateTimeMin(c *chk.C) {
	_, err := headerClient.ParamDatetime("min", utils.ToDateTime("0001-01-01T00:00:00Z"))
	c.Assert(err, chk.IsNil)
}
Пример #15
0
func (s *HeaderSuite) TestHeaderParamDateTimeValid(c *chk.C) {
	_, err := headerClient.ParamDatetime("valid", utils.ToDateTime("2010-01-01T12:34:56Z"))
	c.Assert(err, chk.IsNil)
}