public void GetDateType_Test() { IDataRepository <Person> uu = new PersonData(); IDataRepository <Content> ui = new CommentData(); var person = uu.GetById(1); var comment = ui.GetById(1); Console.WriteLine($"{person.FirstName}\n{comment.Journey}"); }
public void ContentString_Test() { IDataRepository <Person> userDB = new PersonData(); var person = userDB.GetById(1); Journal journal = new Journal(); journal.Journey = new ContentText("Hi all this is @sally", new List <Person> { person }); }
public void GetByTAGZ_Test() { ITags <Journal> tagDB = new JournalData(); IDataRepository <Person> peron = new PersonData(); var person = peron.GetById(3); var result = tagDB.GetByTag(person); foreach (var item in result) { Console.WriteLine(item.Title); } }
public void GetByTag_User_Test() { // Get tag by user IDataRepository <Person> getUser = new PersonData(); var user = getUser.GetById(2); Tag tag = new Tag() { UserTag = user }; ITag <Journal> getbytag = new JournalData(); var journals = getbytag.GetByTag(tag); foreach (var journal in journals) { Console.WriteLine($"{journal.Title}"); } }
public void Tag_test() { IDataRepository <Person> retrieveUser = new PersonData(); Content tag = new Content(); var user = retrieveUser.GetById(3); tag.Tagz = new List <object> { "hi", user, "all" }; var reTag = tag.Tagz.Where(r => tag.Tagz.Contains("Sally")); Person person = new Person(); foreach (var item in tag.Tagz) { if (item is Person) { Console.WriteLine("HI"); person = (Person)item; } Console.WriteLine(item.GetType()); } Console.WriteLine(person.FirstName); }