Example #1
0
        public async Task Given_CallGetActiveRooms_Then_GetActiveRoomsShouldReturnAllRooms()
        {
            Assert.False(DbInMemorySqlite.Rooms.Any());
            DatabaseSetup.AddUser(DbInMemorySqlite);
            _messageHub = new MessageHub(DbInMemorySqlite);
            AssignToHubRequiredProperties(_messageHub);
            await _messageHub.CreateRoom(new RoomModel { RoomName = "RoomieGroomie", UserName = "******", Category = ItemCategory.categories[0] }, new ItemModel { Name = "Flowers", Category = ItemCategory.categories[0], Description = "A flower", URL = "flowerurlhahahehe.com" });

            var roomFromDb = _messageHub.GetActiveRooms();

            Assert.NotNull(roomFromDb);
        }