Esempio n. 1
0
        public void EnsureCreate_uses_api_executor()
        {
            var cert = new CompanyCert(
                "pem",
                new CompanyCertAttributes(
                    "name",
                    new CompanyCertType(CompanyCertType.TypeEnum.Operationssigning),
                    new CompanyCertStatus(CompanyCertStatus.TypeEnum.Trusted)));

            _securityApi.Create(cert);
            _apiExecutorMock.Verify(obj => obj.Execute(It.IsAny <Func <string, CompanyCert, SuccessResponse> >(), "sessionToken", cert));
        }
Esempio n. 2
0
        public void EnsureCreate_uses_api_executor()
        {
            var cert = new CompanyCert()
            {
                Pem        = "pem",
                Attributes = new CompanyCertAttributes()
                {
                    Name = "name",
                    Type = new CompanyCertType()
                    {
                        Type = CompanyCertTypeType.OPERATIONSSIGNING
                    },
                    Status = new CompanyCertStatus()
                    {
                        Type = CompanyCertStatusType.TRUSTED
                    }
                }
            };

            _securityApi.Create(cert);
            _apiExecutorMock.Verify(obj => obj.Execute(It.IsAny <Func <string, CompanyCert, CancellationToken, Task <SuccessResponse> > >(), "sessionToken", cert, default(CancellationToken)));
        }