From 97860da43aa74c98e7098e285f2bc6cd50e47bd9 Mon Sep 17 00:00:00 2001 From: Sravya Garapati Date: Fri, 1 Nov 2019 09:14:51 +0530 Subject: [PATCH] Adding unit tests for PlatFormResponse --- .../oauth2/data/PlatFormResponseTest.java | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 oauth2-platform-api/src/test/java/com/intuit/oauth2/data/PlatFormResponseTest.java diff --git a/oauth2-platform-api/src/test/java/com/intuit/oauth2/data/PlatFormResponseTest.java b/oauth2-platform-api/src/test/java/com/intuit/oauth2/data/PlatFormResponseTest.java new file mode 100644 index 00000000..f8e66f5a --- /dev/null +++ b/oauth2-platform-api/src/test/java/com/intuit/oauth2/data/PlatFormResponseTest.java @@ -0,0 +1,48 @@ +/******************************************************************************* + * Copyright (c) 2017 Intuit + * + * 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 com.intuit.oauth2.data; + +import org.testng.annotations.Test; +import static org.testng.Assert.assertEquals; + + +public class PlatFormResponseTest { + @Test + public void testGetErrorCode() + { + PlatformResponse resp = new PlatformResponse(); + resp.setErrorCode("200"); + assertEquals(resp.getErrorCode(),"200"); + } + + @Test + public void testGetErrorMesssage() + { + PlatformResponse resp = new PlatformResponse(); + resp.setErrorMessage("Error Message"); + assertEquals(resp.getErrorMessage(),"Error Message"); + } + + @Test + public void testGetStatus() + { + PlatformResponse resp = new PlatformResponse(); + resp.setStatus("Status"); + assertEquals(resp.getStatus(),"Status"); + } + + +}