예제 #1
0
        public async Task NpsClientOpenTestAsync()
        {
            Thread.CurrentPrincipal = new ClaimsPrincipal
                                      (
                new ClaimsIdentity
                (
                    new List <Claim>
            {
                new Claim(ClaimTypes.NameIdentifier, "117084294703656960")
            }
                )
                                      );

            var input = new NpsClientOpenInput
            {
                DeviceUniqueId = "BBBBBBBBBB",
                OpenPorts      = new List <string> {
                    "1111", "2222", "3333", "4444", "5555", "6666"
                },                                                                              //, "4444", "5555", "6666", "7777", "8888", "9999"
                Remark = "开通端口单元测试"
            };

            var openResult = await _npsClientService.OpenAsync(input);

            Assert.NotNull(openResult);
        }
예제 #2
0
 public async Task <IExecuteResult> OpenAsync(NpsClientOpenInput input)
 {
     return(ExecuteResult.Ok(await _npsClientService.OpenAsync(input)));
 }