AssertDMLDefinition.java 2.1 KB
Newer Older
1 2 3 4 5 6 7
/*
 * Copyright 1999-2015 dangdang.com.
 * <p>
 * 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
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9 10 11 12 13 14 15 16 17
 *
 * 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.
 * </p>
 */

18
package io.shardingjdbc.dbtest.config.bean;
19

20
import lombok.AllArgsConstructor;
21
import lombok.Getter;
22
import lombok.NoArgsConstructor;
23
import lombok.Setter;
24 25 26 27 28

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
29 30
import java.util.ArrayList;
import java.util.List;
31

32 33
@AllArgsConstructor
@NoArgsConstructor
34 35
@Getter
@Setter
36
@XmlAccessorType(XmlAccessType.FIELD)
37 38 39 40 41 42 43
public class AssertDMLDefinition implements AssertDefinition {

    @XmlAttribute(name = "id")
    private String id;

    @XmlAttribute(name = "expected-data-file")
    private String expectedDataFile;
44
    
45 46
    @XmlAttribute(name = "sharding-rule-type")
    private String shardingRuleType;
47
    
48
    @XmlAttribute(name = "database-config")
49 50 51 52
    private String databaseConfig;
    
    @XmlAttribute(name = "expected-update")
    private Integer expectedUpdate;
53
    
54 55
    @XmlAttribute(name = "sql")
    private String sql;
56
    
57 58 59
    @XmlAttribute(name = "expected-sql")
    private String expectedSql;

60 61
    @XmlElement(name = "parameter")
    private ParameterDefinition parameter = new ParameterDefinition();
62
    
63
    @XmlElement(name = "expected-parameter")
64 65 66 67
    private ParameterDefinition expectedParameter = new ParameterDefinition();
    
    @XmlElement(name = "subAssert")
    private List<AssertSubDefinition> subAsserts = new ArrayList<>();
68
    
69 70
    private String path;
    
71 72 73 74
    @Override
    public String toString() {
        return id;
    }
75
}