From d398a1ebd296295b337f5d3d2306fe148ffe916a Mon Sep 17 00:00:00 2001 From: Sameer Prakash Pradhan Date: Thu, 23 May 2019 19:13:51 +0530 Subject: [PATCH] [ACR-246,245][OAuth2][Removed TC] Change-Id: I57398c6640d1de2340c3a031ab586188902cfcca Signed-off-by: Sameer Prakash Pradhan --- .../testcase/TSCodeGrantAuthorizer.cs | 107 --------------------- .../testcase/TSImplicitGrantAuthorizer.cs | 35 ------- 2 files changed, 142 deletions(-) diff --git a/tct-suite-vs/Tizen.OAuth2.Tests/testcase/TSCodeGrantAuthorizer.cs b/tct-suite-vs/Tizen.OAuth2.Tests/testcase/TSCodeGrantAuthorizer.cs index 8d78682..050a297 100755 --- a/tct-suite-vs/Tizen.OAuth2.Tests/testcase/TSCodeGrantAuthorizer.cs +++ b/tct-suite-vs/Tizen.OAuth2.Tests/testcase/TSCodeGrantAuthorizer.cs @@ -65,42 +65,6 @@ namespace Tizen.Account.OAuth2.Tests [Test] [Category("P2")] - [Description("Validates the response of AuthorizeAsync")] - [Property("SPEC", "Tizen.Account.OAuth2.CodeGrantAuthorizer.AuthorizeAsync M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MEX")] - [Property("AUTHOR", "Kamaljeet Chauhan, kamal.jc@samsung.com")] - public async Task AuthorizeAsync_CHECK_EXCEPTION() - { - try - { - /* - * PRECONDITION - * 1. A valid CodeGrantAuthorizer object - * 2. Prepare CodeGrantAuthorizationRequest parameters - */ - var authorizer = new CodeGrantAuthorizer(); - Assert.IsNotNull(authorizer, "Object should not be null after construction"); - - /* TESTCODE */ - var response = await authorizer.AuthorizeAsync(null); - Assert.IsTrue(false, "Expected to throw an exception"); - - /* POSTCONDITION */ - authorizer.Dispose(); - } - catch (NotSupportedException) - { - Assert.IsTrue(isOAuth2Supported == false, "Invalid NotSupportedException"); - } - catch (Exception ex) - { - Assert.IsTrue(true, "Expected to throw an exception"); - } - } - - [Test] - [Category("P2")] [Description("Validates the response of GetAccessTokenAsync")] [Property("SPEC", "Tizen.Account.OAuth2.CodeGrantAuthorizer.GetAccessTokenAsync M")] [Property("SPEC_URL", "-")] @@ -138,76 +102,5 @@ namespace Tizen.Account.OAuth2.Tests } } - [Test] - [Category("P2")] - [Description("Validates the response of ClearCookies")] - [Property("SPEC", "Tizen.Account.OAuth2.CodeGrantAuthorizer.ClearCookies M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Kamaljeet Chauhan, kamal.jc@samsung.com")] - public void ClearCookies_CHECK_EXCEPTION() - { - try - { - /* - * PRECONDITION - * 1. A valid CodeGrantAuthorizer object - */ - var authorizer = new CodeGrantAuthorizer(); - Assert.IsNotNull(authorizer, "Object should not be null after construction"); - - /* TESTCODE */ - authorizer.ClearCookies(); - Assert.IsTrue(false, "Expected to throw an exception"); - - /* POSTCONDITION */ - authorizer.Dispose(); - } - catch (NotSupportedException) - { - Assert.IsTrue(isOAuth2Supported == false, "Invalid NotSupportedException"); - } - catch (Exception ex) - { - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, ex.ToString()); - Assert.IsTrue(true, "Exception is expected"); - } - } - - [Test] - [Category("P2")] - [Description("Validates the response of ClearCache")] - [Property("SPEC", "Tizen.Account.OAuth2.CodeGrantAuthorizer.ClearCache M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MR")] - [Property("AUTHOR", "Kamaljeet Chauhan, kamal.jc@samsung.com")] - public void ClearCache_CHECK_EXCEPTION() - { - try - { - /* - * PRECONDITION - * 1. A valid CodeGrantAuthorizer object - */ - var authorizer = new CodeGrantAuthorizer(); - Assert.IsNotNull(authorizer, "Object should not be null after construction"); - - /* TESTCODE */ - authorizer.ClearCache(); - Assert.IsTrue(false, "Expected to throw an exception"); - - /* POSTCONDITION */ - authorizer.Dispose(); - } - catch (NotSupportedException) - { - Assert.IsTrue(isOAuth2Supported == false, "Invalid NotSupportedException"); - } - catch (Exception ex) - { - LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, ex.ToString()); - Assert.IsTrue(true, "Exception is expected"); - } - } } } diff --git a/tct-suite-vs/Tizen.OAuth2.Tests/testcase/TSImplicitGrantAuthorizer.cs b/tct-suite-vs/Tizen.OAuth2.Tests/testcase/TSImplicitGrantAuthorizer.cs index f8be299..16f1dc5 100755 --- a/tct-suite-vs/Tizen.OAuth2.Tests/testcase/TSImplicitGrantAuthorizer.cs +++ b/tct-suite-vs/Tizen.OAuth2.Tests/testcase/TSImplicitGrantAuthorizer.cs @@ -63,41 +63,6 @@ namespace Tizen.Account.OAuth2.Tests } } - [Test] - [Category("P2")] - [Description("Validates the response of AuthorizeAsync")] - [Property("SPEC", "Tizen.Account.OAuth2.ImplicitGrantAuthorizer.AuthorizeAsync M")] - [Property("SPEC_URL", "-")] - [Property("CRITERIA", "MEX")] - [Property("AUTHOR", "Kamaljeet Chauhan, kamal.jc@samsung.com")] - public async Task AuthorizeAsync_CHECK_EXCEPTION() - { - try - { - /* - * PRECONDITION - * 1. A valid ImplicitGrantAuthorizer object - * 2. Prepare ImplicitGrantAuthorizationRequest parameters - */ - var authorizer = new ImplicitGrantAuthorizer(); - Assert.IsNotNull(authorizer, "Object should not be null after construction"); - - /* TESTCODE */ - var response = await authorizer.AuthorizeAsync(null); - Assert.IsTrue(false, "Expected to throw an exception"); - - /* POSTCONDITION */ - authorizer.Dispose(); - } - catch (NotSupportedException) - { - Assert.IsTrue(isOAuth2Supported == false, "Invalid NotSupportedException"); - } - catch (Exception ex) - { - Assert.IsTrue(true, "Expected to throw an exception"); - } - } [Test] [Category("P2")] -- 2.7.4