Пример #1
0
        public void GetSecurityGroup()
        {
            using (var httpTest = new HttpTest())
            {
                Identifier securityGroupId = Guid.NewGuid();
                httpTest.RespondWithJson(new SecurityGroup {
                    Id = securityGroupId
                });

                var result = _compute.GetSecurityGroup(securityGroupId);

                httpTest.ShouldHaveCalled($"*/os-security-groups/{securityGroupId}");
                Assert.NotNull(result);
                Assert.Equal(securityGroupId, result.Id);
                Assert.IsType <ComputeApi>(((IServiceResource)result).Owner);
            }
        }