2 * ============LICENSE_START=======================================================
\r
4 * ================================================================================
\r
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
\r
6 * ================================================================================
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
18 * ============LICENSE_END=========================================================
\r
21 package com.att.nsa.cambria.transaction;
\r
23 import static org.junit.Assert.*;
\r
25 import org.junit.After;
\r
26 import org.junit.Before;
\r
27 import org.junit.Test;
\r
29 import com.att.dmf.mr.transaction.TransactionObj;
\r
31 public class TransactionObjTest {
\r
34 public void setUp() throws Exception {
\r
38 public void tearDown() throws Exception {
\r
42 public void testAsJsonObject() {
\r
43 TransactionObj obj = new TransactionObj("23", 100, 98, 2);
\r
48 } catch(NullPointerException e) {
\r
55 public void testGetId() {
\r
56 TransactionObj obj = new TransactionObj("23", 100, 98, 2);
\r
63 public void testSetId() {
\r
64 TransactionObj obj = new TransactionObj("23", 100, 98, 2);
\r
71 public void testGetCreateTime() {
\r
72 TransactionObj obj = new TransactionObj("23", 100, 98, 2);
\r
73 obj.getCreateTime();
\r
79 public void testSetCreateTime() {
\r
80 TransactionObj obj = new TransactionObj("23", 100, 98, 2);
\r
81 obj.setCreateTime("12:00:00");
\r
87 public void testSerialize() {
\r
88 TransactionObj obj = new TransactionObj("23", 100, 98, 2);
\r
95 public void testGetTotalMessageCount() {
\r
96 TransactionObj obj = new TransactionObj("23", 100, 98, 2);
\r
97 obj.getTotalMessageCount();
\r
103 public void testSetTotalMessageCount() {
\r
104 TransactionObj obj = new TransactionObj("23", 100, 98, 2);
\r
105 obj.setTotalMessageCount(200);
\r
111 public void testGetSuccessMessageCount() {
\r
112 TransactionObj obj = new TransactionObj("23", 100, 98, 2);
\r
113 obj.getSuccessMessageCount();
\r
119 public void testSetSuccessMessageCount() {
\r
120 TransactionObj obj = new TransactionObj("23", 100, 98, 2);
\r
121 obj.setSuccessMessageCount(198);
\r
127 public void testGetFailureMessageCount() {
\r
128 TransactionObj obj = new TransactionObj("23", 100, 98, 2);
\r
129 obj.getFailureMessageCount();
\r
135 public void testSetFailureMessageCount() {
\r
136 TransactionObj obj = new TransactionObj("23", 100, 98, 2);
\r
137 obj.setFailureMessageCount(2);
\r
143 public void testGetfData() {
\r
144 TransactionObj obj = new TransactionObj("23", 100, 98, 2);
\r
151 public void testSetfData() {
\r
152 TransactionObj obj = new TransactionObj("23", 100, 98, 2);
\r
153 obj.setfData(null);
\r
159 public void testGetTrnRequest() {
\r
160 TransactionObj obj = new TransactionObj("23", 100, 98, 2);
\r
161 obj.getTrnRequest();
\r
167 public void testSetTrnRequest() {
\r
168 TransactionObj obj = new TransactionObj("23", 100, 98, 2);
\r
169 obj.setTrnRequest(null);
\r