コード例 #1
0
        public async Task ActivateToken_Test()
        {
            _restApiClientMock.Setup(mock => mock.Invoke <CustomerResponse>(It.IsAny <ApiRequest>()))
            .Returns(Task.FromResult(new ApiResponse()
            {
                Success = true, Result = TestResources.CustomerResponse
            }));
            var activateTokenResponse = await _unitTest.ActivateToken(TestResources.CustomerVehicleRegisterModel.CommunityId,
                                                                      TestResources.CustomerVehicleRegisterModel.AppToken, TestResources.DealerCDKConfiguration.PartnerKey);

            var customerResponse = activateTokenResponse.Result as CustomerResponse;

            Assert.True(activateTokenResponse.Success);
            Assert.IsNotNull(customerResponse);
            Assert.AreEqual(customerResponse.ErrorCode, TestResources.CustomerResponse.ErrorCode);
        }