public void CreateVolume() { using (var httpTest = new HttpTest()) { Identifier volumeId = Guid.NewGuid(); httpTest.RespondWithJson(new Volume { Id = volumeId }); var request = new VolumeDefinition(size: 1); var result = _compute.CreateVolume(request); httpTest.ShouldHaveCalled("*/os-volumes"); Assert.Equal(volumeId, result.Id); Assert.IsType <ComputeApi>(((IServiceResource)result).Owner); } }