001/* 002 * Copyright 2002-2016 the original author or authors. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * https://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package org.springframework.test.web.client; 018 019/** 020 * An extension of {@code ResponseActions} that also implements 021 * {@code RequestMatcher} and {@code ResponseCreator} 022 * 023 * <p>While {@code ResponseActions} is the API for defining expectations this 024 * sub-interface is the internal SPI for matching these expectations to actual 025 * requests and for creating responses. 026 * 027 * @author Rossen Stoyanchev 028 * @since 4.3 029 */ 030public interface RequestExpectation extends ResponseActions, RequestMatcher, ResponseCreator { 031 032 /** 033 * Whether there is a remaining count of invocations for this expectation. 034 */ 035 boolean hasRemainingCount(); 036 037 /** 038 * Whether the requirements for this request expectation have been met. 039 */ 040 boolean isSatisfied(); 041 042}