public void NoHeaderOnGetInstanceIfEmptyInstanceName() { var invoker = new FakeCallInvoker(); var client = new InstanceAdminClientBuilder { CallInvoker = invoker }.Build(); client.GetInstance(new GetInstanceRequest()); Assert.Null(invoker.Metadata.FirstOrDefault(e => e.Key == ResourcePrefixHeader)); }
public void SetsHeaderOnGetInstance() { var invoker = new FakeCallInvoker(); var client = new InstanceAdminClientBuilder { CallInvoker = invoker }.Build(); client.GetInstance(new GetInstanceRequest { Name = SampleInstanceName }); Metadata.Entry entry = Assert.Single(invoker.Metadata, e => e.Key == ResourcePrefixHeader); Assert.Equal(SampleInstanceName, entry.Value); }