/* * Copyright 2016 the original author or authors. * * 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 io.restassured.path.json.support; import org.junit.Ignore; @Ignore public class Book { private String category; private String author; private String title; private String isbn; private float price; public Book(String category, String author, String title, String isbn, float price) { this.category = category; this.author = author; this.title = title; this.isbn = isbn; this.price = price; } public Book() { } public String getCategory() { return category; } public void setCategory(String category) { this.category = category; } public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getIsbn() { return isbn; } public void setIsbn(String isbn) { this.isbn = isbn; } public float getPrice() { return price; } public void setPrice(float price) { this.price = price; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Book book = (Book) o; if (Float.compare(book.price, price) != 0) return false; if (author != null ? !author.equals(book.author) : book.author != null) return false; if (category != null ? !category.equals(book.category) : book.category != null) return false; if (isbn != null ? !isbn.equals(book.isbn) : book.isbn != null) return false; if (title != null ? !title.equals(book.title) : book.title != null) return false; return true; } @Override public int hashCode() { int result = category != null ? category.hashCode() : 0; result = 31 * result + (author != null ? author.hashCode() : 0); result = 31 * result + (title != null ? title.hashCode() : 0); result = 31 * result + (isbn != null ? isbn.hashCode() : 0); result = 31 * result + (price != +0.0f ? Float.floatToIntBits(price) : 0); return result; } }