public void AssetTargetFrameworkEquals_WithNonAssetTargetFallbackFramework_Succeeds(string shortFrameworkName)
        {
            var nugetFramework      = NuGetFramework.Parse(shortFrameworkName);
            var assetTargetFallback = new AssetTargetFallbackFramework(nugetFramework, fallbackFrameworks: SampleFrameworkList);

            Assert.False(assetTargetFallback.Equals((object)nugetFramework));
        }
Esempio n. 2
0
        public void GetAllByQuerry_WithIsbn_CallsGetAllByTitleOrAuthor()
        {
            var bookRepositoryStub = new Mock <IBookRepository>();

            bookRepositoryStub.Setup(x => x.GetAllByTitleOrAuthor(It.IsAny <string>()))
            .Returns(new[] { new Book(1, "", "", "") });

            bookRepositoryStub.Setup(x => x.GetAllByTitleOrAuthor(It.IsAny <string>()))
            .Returns(new[] { new Book(2, "", "", "") });

            var bookService = new BookService(bookRepositoryStub.Object);
            var invalid     = "ISBN 12345-67890";
            var actual      = bookService.GetAllByQuery(invalid);

            Assert.Collection(actual, book => AssetTargetFallbackFramework.Equals(2, book.Id));
        }