本文整理匯總了Golang中github.com/maximilien/softlayer-go/softlayer.SoftLayer_Virtual_Guest_Block_Device_Template_Group_Service.GetObject方法的典型用法代碼示例。如果您正苦於以下問題:Golang SoftLayer_Virtual_Guest_Block_Device_Template_Group_Service.GetObject方法的具體用法?Golang SoftLayer_Virtual_Guest_Block_Device_Template_Group_Service.GetObject怎麽用?Golang SoftLayer_Virtual_Guest_Block_Device_Template_Group_Service.GetObject使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/maximilien/softlayer-go/softlayer.SoftLayer_Virtual_Guest_Block_Device_Template_Group_Service
的用法示例。
在下文中一共展示了SoftLayer_Virtual_Guest_Block_Device_Template_Group_Service.GetObject方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1:
Context("#GetName", func() {
It("returns the name for the service", func() {
name := vgbdtgService.GetName()
Expect(name).To(Equal("SoftLayer_Virtual_Guest_Block_Device_Template_Group"))
})
})
Context("#GetObject", func() {
BeforeEach(func() {
vgbdtGroup.Id = 200150
fakeClient.FakeHttpClient.DoRawHttpRequestResponse, err = testhelpers.ReadJsonTestFixtures("services", "SoftLayer_Virtual_Guest_Block_Device_Template_Group_Service_getObject.json")
Expect(err).ToNot(HaveOccurred())
})
It("sucessfully retrieves SoftLayer_Virtual_Guest_Block_Device_Template_Group instance", func() {
vgbdtg, err := vgbdtgService.GetObject(vgbdtGroup.Id)
Expect(err).ToNot(HaveOccurred())
Expect(vgbdtg.AccountId).To(Equal(278444))
Expect(vgbdtg.CreateDate).ToNot(BeNil())
Expect(vgbdtg.Id).To(Equal(vgbdtGroup.Id))
Expect(vgbdtg.Name).To(Equal("BOSH-eCPI-packer-centos-2014-08-12T15:54:16Z"))
Expect(vgbdtg.Note).To(Equal("centos image created by packer at 2014-08-12T15:54:16Z"))
Expect(vgbdtg.ParentId).To(BeNil())
Expect(vgbdtg.PublicFlag).To(Equal(0))
Expect(vgbdtg.StatusId).To(Equal(1))
Expect(vgbdtg.Summary).To(Equal("centos image created by packer at 2014-08-12T15:54:16Z"))
Expect(vgbdtg.TransactionId).To(BeNil())
Expect(vgbdtg.UserRecordId).To(Equal(239954))
Expect(vgbdtg.GlobalIdentifier).To(Equal("8071601b-5ee1-483e-a9e8-6e5582dcb9f7"))
})
開發者ID:TheWeatherCompany,項目名稱:softlayer-go,代碼行數:30,代碼來源:softLayer_virtual_guest_block_device_template_group_test.go