}
}
- //[Test]
+ [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", "Jyothi Kumar Sambolu, s.jyothi@samsung.com")]
+ [Property("AUTHOR", "Kamaljeet Chauhan, kamal.jc@samsung.com")]
public async Task AuthorizeAsync_CHECK_EXCEPTION()
{
try
var authorizer = new CodeGrantAuthorizer();
Assert.IsNotNull(authorizer, "Object should not be null after construction");
- var request = OAuth2Helper.CreateCodeGrantAuthRequest(true);
- Assert.IsNotNull(request, "Object should not be null after construction");
-
/* TESTCODE */
- var response = await authorizer.AuthorizeAsync(request);
+ var response = await authorizer.AuthorizeAsync(null);
Assert.IsTrue(false, "Expected to throw an exception");
/* POSTCONDITION */
}
catch (Exception ex)
{
- Assert.IsTrue(ex is OAuth2Exception, "Wrong exception thrown.Expected is OAuth2Exception");
+ Assert.IsTrue(true, "Expected to throw an exception");
}
}
}
}
- //[Test]
- [Category("P1")]
- [Description("Checks the invocation of ClearCookies")]
+ [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", "Jyothi Kumar Sambolu, s.jyothi@samsung.com")]
- public void ClearCookies_CHECK_NO_EXCEPTION()
+ [Property("AUTHOR", "Kamaljeet Chauhan, kamal.jc@samsung.com")]
+ public void ClearCookies_CHECK_EXCEPTION()
{
try
{
/* TESTCODE */
authorizer.ClearCookies();
- Assert.IsTrue(true, "Not Expected to throw an exception");
+ Assert.IsTrue(false, "Expected to throw an exception");
/* POSTCONDITION */
authorizer.Dispose();
catch (Exception ex)
{
LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, ex.ToString());
- Assert.IsTrue(false, "Exception is not expected");
+ Assert.IsTrue(true, "Exception is expected");
}
}
- //[Test]
- [Category("P1")]
- [Description("Checks the invocation of ClearCache")]
+ [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", "Jyothi Kumar Sambolu, s.jyothi@samsung.com")]
- public void ClearCache_CHECK_NO_EXCEPTION()
+ [Property("AUTHOR", "Kamaljeet Chauhan, kamal.jc@samsung.com")]
+ public void ClearCache_CHECK_EXCEPTION()
{
try
{
/* TESTCODE */
authorizer.ClearCache();
- Assert.IsTrue(true, "Not Expected to throw an exception");
+ Assert.IsTrue(false, "Expected to throw an exception");
/* POSTCONDITION */
authorizer.Dispose();
catch (Exception ex)
{
LogUtils.Write(LogUtils.DEBUG, LogUtils.TAG, ex.ToString());
- Assert.IsTrue(false, "Exception is not expected");
+ Assert.IsTrue(true, "Exception is expected");
}
}
}
}
}
- //[Test]
+ [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", "Jyothi Kumar Sambolu, s.jyothi@samsung.com")]
- public async Task AuthorizeAsync_EXCEPTION()
+ [Property("AUTHOR", "Kamaljeet Chauhan, kamal.jc@samsung.com")]
+ public async Task AuthorizeAsync_CHECK_EXCEPTION()
{
try
{
var authorizer = new ImplicitGrantAuthorizer();
Assert.IsNotNull(authorizer, "Object should not be null after construction");
- var request = OAuth2Helper.CreateImplicitGrantAuthRequest(true);
- Assert.IsNotNull(request, "Object should not be null after construction");
-
/* TESTCODE */
- var response = await authorizer.AuthorizeAsync(request);
+ var response = await authorizer.AuthorizeAsync(null);
Assert.IsTrue(false, "Expected to throw an exception");
/* POSTCONDITION */
}
catch (Exception ex)
{
- Assert.IsTrue(ex is OAuth2Exception, "Wrong exception thrown.Expected is OAuth2Exception");
+ Assert.IsTrue(true, "Expected to throw an exception");
}
}