public void CannotGetStorytellerByInvalidId_ReturnException() { Storyteller storyteller = new Storyteller("Name", 0, true, "img.png", "About", 18) { Id = null, AccessFailedCount = 0, EmailConfirmed = false, PhoneNumberConfirmed = false, TwoFactorEnabled = false, LockoutEnabled = false, UserName = "******", NormalizedUserName = "******", Email = "*****@*****.**", NormalizedEmail = "*****@*****.**", PasswordHash = "Pasfjdsasd", ConcurrencyStamp = "fjjffjfjf", LockoutEnd = DateTime.Now, PhoneNumber = "885553531", SecurityStamp = "Securitystamp", }; IStorytellerCRUD storytellerService = new StorytellerService(); storytellerService.GetStorytellerById(storyteller.Id); }
public void CanGetStorytellerByValidId() { Storyteller storyteller = new Storyteller("Name", 0, true, "img.png", "About", 18) { Id = "5050241f-a600-4d64-8634-0de904c043c1", AccessFailedCount = 0, EmailConfirmed = false, PhoneNumberConfirmed = false, TwoFactorEnabled = false, LockoutEnabled = false, UserName = "******", NormalizedUserName = "******", Email = "*****@*****.**", NormalizedEmail = "*****@*****.**", PasswordHash = "Pasfjdsasd", ConcurrencyStamp = "fjjffjfjf", LockoutEnd = DateTime.Now, PhoneNumber = "885553531", SecurityStamp = "Securitystamp", }; IStorytellerCRUD storytellerService1 = new StorytellerService(); IStorytellerCRUD storytellerService2 = new StorytellerService(); IStorytellerCRUD storytellerService3 = new StorytellerService(); storytellerService1.CreateStoryteller(storyteller); var result = storytellerService2.GetStorytellerById(storyteller.Id); storytellerService3.DeleteStorytellerById(storyteller.Id); Assert.AreEqual(storyteller.Id, result.Id); }