Пример #1
0
        public void CanBindRequestFromUriTemplateWithoutExplicitSession()
        {
            // Arrange
            Template template = new Template(Constants.CatPath);

            // Act
            using (var response = template.Bind(BaseUrl, new { name = "Petra" }).AcceptJson().Get <Cat>())
            {
                var body = response.Body;

                // Assert
                Assert.IsNotNull(body);
                Assert.AreEqual("Petra", body.Name);
            }
        }
Пример #2
0
 protected override void InitAdaptee()
 {
     this.adaptee = new Tavis.UriTemplates.UriTemplate(this.Template, this.PartialExpand, !this.CaseSensitive);
 }