Example #1
0
        public void GetFloatingIP()
        {
            using (var httpTest = new HttpTest())
            {
                Identifier floatingIPId = Guid.NewGuid();
                httpTest.RespondWithJson(new FloatingIP {
                    Id = floatingIPId
                });

                var result = _networking.GetFloatingIP(floatingIPId);

                httpTest.ShouldHaveCalled($"*/floatingips/{floatingIPId}");
                Assert.NotNull(result);
                Assert.Equal(floatingIPId, result.Id);
                Assert.IsType <NetworkingApiBuilder>(((IServiceResource)result).Owner);
            }
        }