public void ById_WithNoProfessions_ReturnsNull()
        {
            var options = new DbContextOptionsBuilder <GameInfoContext>()
                          .UseInMemoryDatabase(databaseName: "NoProfessions_ForById")
                          .Options;

            using (var context = new GameInfoContext(options))
            {
                var service = new ProfessionsService(context);
                Assert.Null(service.ById(1));
            }
        }
        public void ById_WithProfession_ReturnsProfession()
        {
            var options = new DbContextOptionsBuilder <GameInfoContext>()
                          .UseInMemoryDatabase(databaseName: "WithProfession_ForById")
                          .Options;

            using (var context = new GameInfoContext(options))
            {
                var service = new ProfessionsService(context);

                var professionToAdd = new Profession()
                {
                    Name = "Profession"
                };

                context.Professions.Add(professionToAdd);
                context.SaveChanges();

                var professionFromDb = service.ById(1);

                Assert.Equal(professionToAdd.Name, professionFromDb.Name);
            }
        }