public void ReturnNotNull_TeamToolsDbContext() { // Arrange & Act var result = MeetMeDbContext.Create(); // Assert Assert.IsNotNull(result); }
public void ReturnInstanceOf_TeamToolsDbContext() { // Arrange & Act var result = MeetMeDbContext.Create(); // Assert Assert.IsInstanceOf <MeetMeDbContext>(result); }
public void InitializeTeamToolsDbContext_Correct() { // Arrange & Act var context = new MeetMeDbContext(); // Assert Assert.IsNotNull(context); }
public AuthRepository() { _context = new MeetMeDbContext(); _userManager = new ApplicationUserManager(new UserStore <User>(_context)); var provider = new DpapiDataProtectionProvider("MeetMe"); _userManager.UserTokenProvider = new DataProtectorTokenProvider <User>(provider.Create("EmailConfirmation")); _userManager.EmailService = new EmailService(); }
public void InitializeTeamToolsDbContext_CorrectWhenStateFactoryIsSet() { // Arrange var mockedFactory = new Mock <IStateFactory>(); // Act var context = new MeetMeDbContext(mockedFactory.Object); // Assert Assert.IsNotNull(context); }
public void IsVirtual() { // Arrange var mockedDbSet = new Mock <IDbSet <Notification> >(); var context = new MeetMeDbContext(); // Act bool isVirtual = context.GetType().GetProperty("Notifications").GetGetMethod().IsVirtual; // Assert Assert.IsTrue(isVirtual); }
public void SetNotifications_Correct() { // Arrange var mockedDbSet = new Mock <IDbSet <Notification> >(); var context = new MeetMeDbContext(); // Act context.Notifications = mockedDbSet.Object; // Assert Assert.AreSame(context.Notifications, mockedDbSet.Object); }
public void SetCustomUsers_Correct() { // Arrange var mockedDbSet = new Mock <IDbSet <CustomUser> >(); var context = new MeetMeDbContext(); // Act context.CustomUsers = mockedDbSet.Object; // Assert Assert.AreSame(context.CustomUsers, mockedDbSet.Object); }
public void IsVirtual() { // Arrange var mockedDbSet = new Mock <IDbSet <CustomUser> >(); var context = new MeetMeDbContext(); // Act bool isVirtual = context.GetType().GetProperty("Comments").GetGetMethod().IsVirtual; // Assert Assert.IsTrue(isVirtual); }
public void SetMessages_Correct() { // Arrange var mockedDbSet = new Mock <IDbSet <Message> >(); var context = new MeetMeDbContext(); // Act context.Messages = mockedDbSet.Object; // Assert Assert.AreSame(context.Messages, mockedDbSet.Object); }
public void SetStatistics_Correct() { // Arrange var mockedDbSet = new Mock <IDbSet <Statistic> >(); var context = new MeetMeDbContext(); // Act context.Statistics = mockedDbSet.Object; // Assert Assert.AreSame(context.Statistics, mockedDbSet.Object); }
public EventRepository() { _context = new MeetMeDbContext(); }
public ConnectionNotificationRepository() { _context = new MeetMeDbContext(); }
public MeetingRepository() { _context = new MeetMeDbContext(); }
public UserRepository() { _context = new MeetMeDbContext(); }
public static void Initialize() { Database.SetInitializer(new MigrateDatabaseToLatestVersion <MeetMeDbContext, Configuration>()); MeetMeDbContext.Create().Database.Initialize(true); }