private static void SeedMockedMessages(WebChatDataMock data)
        {
            data.Messages.Add(new Message()
            {
                Text     = "FirstMessage",
                SentDate = new DateTime(2000, 1, 1),
                Id       = 1,
                PosterId = MockedUserId,
                Poster   = GetMockedUser(),
                RoomId   = 1
            });

            data.Messages.Add(new Message()
            {
                Text     = "SecondMessage",
                SentDate = new DateTime(1999, 1, 1),
                Id       = 2,
                PosterId = MockedUserId,
                Poster   = GetMockedUser(),
                RoomId   = 1
            });

            data.Messages.Add(new Message()
            {
                Text     = "ThirdMessage",
                SentDate = new DateTime(1999, 5, 1),
                Id       = 3,
                PosterId = MockedUserId,
                Poster   = GetMockedUser(),
                RoomId   = 1
            });
        }
        private static void SeedMockedRooms(WebChatDataMock data)
        {
            data.Rooms.Add(new Room()
            {
                Id    = 1,
                Name  = "FirstRoom",
                Users = new List <ApplicationUser>()
                {
                    GetMockedUser()
                },
                Messages = data.Messages.GetAll().ToList()
            });

            data.Rooms.Add(new Room()
            {
                Id    = 2,
                Name  = "SecondRoom",
                Users = new List <ApplicationUser>()
                {
                    GetMockedUser()
                },
                Messages = data.Messages.GetAll().ToList()
            });

            data.Rooms.Add(new Room()
            {
                Id    = 3,
                Name  = "ThirdRoom",
                Users = new List <ApplicationUser>()
                {
                    GetMockedUser()
                },
                Messages = data.Messages.GetAll().ToList()
            });
        }
 public void Initialize()
 {
     this.dataMock = new WebChatDataMock();
     this.serializer = new JavaScriptSerializer();
     this.controller = new AccountController(this.dataMock,IdProviderMock.GetUserIdProvider().Object);
     this.serializer = new JavaScriptSerializer();
     this.Setup();
 }
 private static void SeedMockedUsers(WebChatDataMock data)
 {
     data.Users.Add(GetMockedUser());
 }
 private static void SeedMockedUsers(WebChatDataMock data)
 {
     data.Users.Add(GetMockedUser());
 }
        private static void SeedMockedRooms(WebChatDataMock data)
        {
            data.Rooms.Add(new Room()
            {
                Id = 1,
                Name = "FirstRoom",
                Users = new List<ApplicationUser>() { GetMockedUser() },
                Messages = data.Messages.GetAll().ToList()
            });

            data.Rooms.Add(new Room()
            {
                Id = 2,
                Name = "SecondRoom",
                Users = new List<ApplicationUser>() { GetMockedUser() },
                Messages = data.Messages.GetAll().ToList()
            });

            data.Rooms.Add(new Room()
            {
                Id = 3,
                Name = "ThirdRoom",
                Users = new List<ApplicationUser>() { GetMockedUser() },
                Messages = data.Messages.GetAll().ToList()
            });
        }
        private static void SeedMockedMessages(WebChatDataMock data)
        {
            data.Messages.Add(new Message()
            {
                Text = "FirstMessage",
                SentDate = new DateTime(2000, 1, 1),
                Id = 1,
                PosterId = MockedUserId,
                Poster = GetMockedUser(),
                RoomId = 1
            });

            data.Messages.Add(new Message()
            {
                Text = "SecondMessage",
                SentDate = new DateTime(1999, 1, 1),
                Id = 2,
                PosterId = MockedUserId,
                Poster = GetMockedUser(),
                RoomId = 1
            });

            data.Messages.Add(new Message()
            {
                Text = "ThirdMessage",
                SentDate = new DateTime(1999, 5, 1),
                Id = 3,
                PosterId = MockedUserId,
                Poster = GetMockedUser(),
                RoomId = 1
            });
        }