public void GivenThatBookHasOneAuthor_WhenAccessingAdapterAuthors_ThenAdapterHasOneAuthor()
        {
            var entity = new BookEntity { Authors = new[] { "Joakim Skoog" } };

            var adapter = new BookEntityAdapter(entity);

            Assert.AreEqual(entity.Authors.Count(), adapter.Authors.Count);
        }
        public void GivenThatBookHasName_WhenAccessingAdapterName_ThenAdapterNameIsSameAsBook()
        {
            var entity = new BookEntity { Name = "bookName" };

            var adapter = new BookEntityAdapter(entity);

            Assert.AreEqual(entity.Name, adapter.Name);
        }
        public void GivenThatBookHasNumberOfPages_WhenAccessingAdapterNumberOfPages_ThenAdapterNumberOfPagesIsSameAsBook()
        {
            var entity = new BookEntity { NumberOfPages = 312 };

            var adapter = new BookEntityAdapter(entity);

            Assert.AreEqual(entity.NumberOfPages, adapter.NumberOfPages);
        }
        public void GivenThatBookHasIsbn_WhenAccessingAdapterIsbn_ThenAdapterIsbnIsSameAsBook()
        {
            var entity = new BookEntity { ISBN = "isbn" };

            var adapter = new BookEntityAdapter(entity);

            Assert.AreEqual(entity.ISBN, adapter.ISBN);
        }
        public void GivenThatBookHasHardcoverMediaType_WhenAccessingAdapterMediaType_ThenAdapterMediaTypeIsHardcover()
        {
            var entity = new BookEntity {MediaType = MediaTypeEntity.Hardcover};

            var adapter = new BookEntityAdapter(entity);

            Assert.AreEqual(MediaType.Hardcover, adapter.MediaType);
        }
        public void GivenThatBookHasCountry_WhenAccessingAdapterCountry_ThenAdapterCountryIsSameAsBook()
        {
            var entity = new BookEntity { Country = "Sweden" };

            var adapter = new BookEntityAdapter(entity);

            Assert.AreEqual(entity.Country, adapter.Country);
        }
        public void GivenThatBookHasOnePovCharacter_WhenAccessingPovCharacters_ThenAdapterPovCharactersContaineOneCharacter()
        {
            var entity = new BookEntity { PovCharacters = new List<CharacterEntity> { new CharacterEntity { Id = 1, Name = "characterName" } } };

            var adapter = new BookEntityAdapter(entity);

            Assert.AreEqual(entity.PovCharacters.Count, adapter.POVCharacters.Count);
        }
        public void GivenThatBookHasReleaseDate_WhenAccessingAdapterReleaseDate_ThenAdapterReleaseDateIsSameAsBook()
        {
            var entity = new BookEntity { ReleaseDate = new DateTime(2000, 1, 1) };

            var adapter = new BookEntityAdapter(entity);

            Assert.AreEqual(entity.ReleaseDate, adapter.Released);
        }
        public void GivenThatBookHasPublisher_WhenAccessingAdapterPublisher_ThenAdapterPublisherIsSameAsBook()
        {
            var entity = new BookEntity { Publisher = "publisher" };

            var adapter = new BookEntityAdapter(entity);

            Assert.AreEqual(entity.Publisher, adapter.Publisher);
        }