public override void AddHypermediaLinks(HypermediaBuilder builder) { Add(new Link() { Rel = "self", Href = new Uri("https://testgenericlinkmodel.test.com") }); }
public void AddDuplicateKeyTest() { var builder = new HypermediaBuilder(); var model = new DuplicateKeyModel(); Action act = () => model.AddHypermediaLinks(builder); Assert.Throws <ArgumentException>(act); }
public void AddModelLinkTest() { var builder = new HypermediaBuilder(); var model = new LinkTestModel() { MoqModel = new MoqHyperlinkModel() }; model.AddHyperMediaSupportLinks(builder); Assert.Equal(model.Links.Count(), 1); Assert.Equal(model.MoqModel.Links.Count(), 1); }
public HypermediaBuilderTests() { mockDocument = new Mock <IHypermediaDocument>(); sut = new HypermediaBuilder <IHypermediaDocument>(Mock.Of <IHypermediaService>(), mockDocument.Object); }
public override void AddHypermediaLinks(HypermediaBuilder builder) { Add(builder.FormConfiguration("modeltest", new { Id = 1 }).Build().AddSelfRel()); }
public override void AddHypermediaLinks(HypermediaBuilder builder) { throw new NotImplementedException(); }
public override void AddHypermediaLinks(HypermediaBuilder builder) { Add(builder.FromController <FakeController>(c => nameof(c.GetCollectionModel), values: new { id = Id, name = Name }).Build().AddSelfRel()); Add(builder.FormConfiguration("modeltest", new { id = 1 }).Build().AddRel("modeltest")); }
public override void AddHypermediaLinks(HypermediaBuilder builder) { Add(builder.FromController <FakeController>(c => nameof(c.GetSimpleModel), new { id = Id, name = Name }).Type("GET").Build().AddSelfRel()); }
public override void AddHypermediaLinks(HypermediaBuilder builder) { Add(builder.Fromtemplate(template: "/genericlist", uri: new Uri("https://templatetest.com")).Build().AddSelfRel()); }
public override void AddHypermediaLinks(HypermediaBuilder builder) { Add(builder.Fromtemplate("/moq/{id}/items", new { id = Id }, uri: new Uri("https://templatetest.com")).Build().AddSelfRel()); }