public void ContactDetails_ContactInitialized_ShouldReturnContactInformation(IContactProfileProvider contact, IProfileProvider profile, ITracker tracker) { //arrange var controller = new DemoController(contact, profile); using (new TrackerSwitcher(tracker)) { controller.ContactDetails().As<ViewResult>().Model.Should().BeOfType<ContactInformation>(); } }
public void ContactDetails_ContactNotInitialized_ShouldReturnNull(IContactProfileProvider contact, IProfileProvider profile, ITracker tracker) { tracker.Contact.Returns((Contact)null); //arrange var controller = new DemoController(contact, profile); using (new TrackerSwitcher(tracker)) { controller.ContactDetails().Should().BeNull(); } }