001// *************************************************************************************************************************** 002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * 003// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * 004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * 005// * with the License. You may obtain a copy of the License at * 006// * * 007// * http://www.apache.org/licenses/LICENSE-2.0 * 008// * * 009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * 010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * 011// * specific language governing permissions and limitations under the License. * 012// *************************************************************************************************************************** 013package org.apache.juneau.assertions; 014 015import java.time.*; 016 017import org.apache.juneau.internal.*; 018 019/** 020 * Used for assertion calls against {@link ZonedDateTime} objects. 021 * 022 * <h5 class='section'>Example:</h5> 023 * <p class='bcode w800'> 024 * <jc>// Validates the specified date is after the current date.</jc> 025 * <jsm>assertZonedDateTime</jsm>(<jv>myZdt</jv>).isAfterNow(); 026 * </p> 027 */ 028@FluentSetters(returns="ZonedDateTimeAssertion") 029public class ZonedDateTimeAssertion extends FluentZonedDateTimeAssertion<ZonedDateTimeAssertion> { 030 031 /** 032 * Creator. 033 * 034 * @param value The date being wrapped. 035 * @return A new {@link ZonedDateTimeAssertion} object. 036 */ 037 public static ZonedDateTimeAssertion create(ZonedDateTime value) { 038 return new ZonedDateTimeAssertion(value); 039 } 040 041 /** 042 * Creator. 043 * 044 * @param value The date being wrapped. 045 */ 046 public ZonedDateTimeAssertion(ZonedDateTime value) { 047 super(value, null); 048 } 049 050 @Override 051 protected ZonedDateTimeAssertion returns() { 052 return this; 053 } 054 055 // <FluentSetters> 056 057 @Override /* GENERATED - Assertion */ 058 public ZonedDateTimeAssertion msg(String msg, Object...args) { 059 super.msg(msg, args); 060 return this; 061 } 062 063 @Override /* GENERATED - Assertion */ 064 public ZonedDateTimeAssertion stderr() { 065 super.stderr(); 066 return this; 067 } 068 069 @Override /* GENERATED - Assertion */ 070 public ZonedDateTimeAssertion stdout() { 071 super.stdout(); 072 return this; 073 } 074 075 // </FluentSetters> 076}