public void ShouldSetEntityReferencePost() { Guid goalId = Guid.NewGuid(); EntityReference entityReference = EntityReference.Goal(goalId); Post post = new Post(Guid.NewGuid(), "Post novo", "Post com EntityReference!!!", entityReference, null); Assert.IsNotNull(post.EntityReference); Assert.IsTrue(post.EntityReference.HasReference); Assert.AreEqual(EntityReferenceType.Goal, post.EntityReference.ReferenceType); Assert.AreEqual(goalId, post.EntityReference.ReferenceId); }
public Post CreateGoalRegisteredPost(Guid profileId, Guid goalId) { EntityReference entityReference = EntityReference.Goal(goalId); return(new Post(profileId, "Novo objetivo definido", $"VocĂȘ pode ver mais detalhes no meu registro de objetivos.", entityReference)); }