Пример #1
0
        public void ModelToFacadeMapsCorrectly()
        {
            var model = new Topic
            {
                Id          = Identity.Random(),
                Description = _description,
                Name        = _name,
                GroupId     = _groupId
            };

            var facade = model.ToFacade();

            Assert.That(facade.Id, Is.EqualTo(model.Id.ToFacade()));
            Assert.That(facade.Description, Is.EqualTo(model.Description));
            Assert.That(facade.Name, Is.EqualTo(model.Name));

            facade.Links.Should().Contain(new Link(ResourceLocation.OfGroup(_groupId),
                                                   TellagoStudios.Hermes.RestService.Constants.Relationships.Group));
        }
Пример #2
0
 public void SetUp()
 {
     _description = "Description";
     _groupId     = Identity.Random();
     _name        = "The awesome group";
 }