Skip to content

Commit

Permalink
GetSessionAccessKeyResponseUnmarshaller Unit Tests (#69)
Browse files Browse the repository at this point in the history
* GetSessionAccessKeyResponseUnmarshaller Unit Tests
  • Loading branch information
AxiosLeo authored and JacksonTian committed Jan 23, 2019
1 parent a3c3fc5 commit 6486ed4
Showing 1 changed file with 33 additions and 0 deletions.
@@ -0,0 +1,33 @@
using System.Collections.Generic;

using Aliyun.Acs.Core.Auth.Sts;
using Aliyun.Acs.Core.Transform;

using Xunit;

namespace Aliyun.Acs.Core.UnitTests.Auth.Sts
{
public class GetSessionAccessKeyResponseUnmarshallerTest
{
[Fact]
public void GetSessionAccessKeyResponseUnmarshallTest()
{
UnmarshallerContext unmarshallerContext = new UnmarshallerContext();
if (unmarshallerContext.ResponseDictionary == null)
{
unmarshallerContext.ResponseDictionary = new Dictionary<string, string>
{ { "GetSessionAccessKey.RequestId", "RequestId" },
{ "GetSessionAccessKey.SessionAccessKey.SessionAccessKeyId", "SessionAccessKeyId" },
{ "GetSessionAccessKey.SessionAccessKey.SessionAccessKeySecret", "SessionAccessKeySecret" },
{ "GetSessionAccessKey.SessionAccessKey.Expiration", "100" }
};
}

GetSessionAccessKeyResponse response = GetSessionAccessKeyResponseUnmarshaller.Unmarshall(unmarshallerContext);
Assert.Equal("RequestId", response.RequestId);
Assert.Equal("SessionAccessKeyId", response.SessionAccesskey.SessionAccessKeyId);
Assert.Equal("SessionAccessKeySecret", response.SessionAccesskey.SessionAccessKeySecert);
Assert.Equal("100", response.SessionAccesskey.Expiration);
}
}
}

0 comments on commit 6486ed4

Please sign in to comment.