org.dbflute.testing.matcher.IsColumnIsNotNull Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dbflute-hamcrest Show documentation
Show all versions of dbflute-hamcrest Show documentation
This is a testing support library for DBFlute that helps you to free unit testing from the database.
It provides ConditionBean matchers, utilities for mock Behavior and some JUnit helpers.
/*
* Copyright 2015 Toshio Takiguchi.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.dbflute.testing.matcher;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.seasar.dbflute.cbean.cvalue.ConditionValue;
/**
* Matches when the column has is not null condition.
*
* @author taktos
*
*/
public class IsColumnIsNotNull extends BaseMatcher {
@Override
public boolean matches(Object item) {
ConditionValue cv = (ConditionValue) item;
return cv.hasIsNotNull();
}
@Override
public void describeTo(Description description) {
description.appendText("is not null");
}
@Override
public void describeMismatch(Object item, Description description) {
description.appendText("has no IS_NOT_NULL condition");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy