// ARRANGE — constructor behaves the same as [SetUp] public HomeControllerTests() { contactRepo = new FakeContactFormRepository(); signupRepo = new FakeNewsletterSignupRepository(); spellRepo = new FakeSpellRepository(); controller = new HomeController(new NullLogger <HomeController>(), contactRepo, signupRepo, spellRepo); message = new ContactForm() { Name = "Luminous Nox-Lupin", Email = "*****@*****.**", Phone = "737-555-9993", Message = "Lorem ipsum dolor sit amet." }; email = new NewsletterSignup() { EmailAddress = "*****@*****.**" }; spell = new Spell() { Title = "Excepteur Sint Occaecat", Enchantment = "Lorem ipsum dolor sit amet.", Intention = "Knowledge", MagicType = "White", User = new AppUser() { UserName = "******", FirstName = "Ravinia", LastName = "Blaque" }, Filename = "xyzy.jpg" }; spellRepo.AddSpell(spell); }
// ARRANGE — constructor behaves the same as [SetUp] public SpellbookControllerTests() { spellRepo = new FakeSpellRepository(); controller = new SpellbookController(userManager, signInManager, spellRepo); spell = new Spell() { Title = "Excepteur Sint Occaecat", Enchantment = "Lorem ipsum dolor sit amet.", Intention = "Knowledge", MagicType = "White", User = new AppUser() { UserName = "******", FirstName = "Ravinia", LastName = "Blaque" }, Filename = "xyzy.jpg" }; }