public void NuspecReader_ReturnsNuspecReader() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageCoreReaderTestPackage())) { var nuspecReader = test.Reader.NuspecReader; Assert.NotNull(nuspecReader); } }
public async Task GetDevelopmentDependencyAsync_ReturnsFalseIfNotDevelopmentDependency() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageCoreAndContentReaderMinimalTestPackage())) { var isDevelopmentDependency = await test.Reader.GetDevelopmentDependencyAsync(CancellationToken.None); Assert.False(isDevelopmentDependency); } }
public void GetDevelopmentDependency_ReturnsFalseIfNotDevelopmentDependency() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageCoreAndContentReaderMinimalTestPackage())) { var isDevelopmentDependency = test.Reader.GetDevelopmentDependency(); Assert.False(isDevelopmentDependency); } }
public async Task GetDevelopmentDependencyAsync_ReturnsTrueIfDevelopmentDependency() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetDevelopmentDependencyPackage())) { var isDevelopmentDependency = await test.Reader.GetDevelopmentDependencyAsync(CancellationToken.None); Assert.True(isDevelopmentDependency); } }
public async Task GetNuspecReaderAsync_ReturnsNuspecReader() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageCoreReaderTestPackage())) { var nuspecReader = await test.Reader.GetNuspecReaderAsync(CancellationToken.None); Assert.NotNull(nuspecReader); } }
public async Task IsServiceableAsync_ReturnsFalseIfNotServiceable() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageCoreAndContentReaderMinimalTestPackage())) { var isServiceable = await test.Reader.IsServiceableAsync(CancellationToken.None); Assert.False(isServiceable); } }
public void GetNuspecFile_ReturnsNuspecPathInPackage() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageCoreReaderTestPackage())) { var filePath = test.Reader.GetNuspecFile(); Assert.Equal(Path.Combine(test.RootDirectoryPath, "Aa.nuspec"), filePath); } }
public async Task IsServiceableAsync_ReturnsTrueIfServiceable() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetServiceablePackage())) { var isServiceable = await test.Reader.IsServiceableAsync(CancellationToken.None); Assert.True(isServiceable); } }
public async Task GetMinClientVersionAsync_ReturnsNullIfNoMinClientVersion() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageCoreAndContentReaderMinimalTestPackage())) { var version = await test.Reader.GetMinClientVersionAsync(CancellationToken.None); Assert.Null(version); } }
public void IsServiceable_ReturnsTrueIfServiceable() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetServiceablePackage())) { var isServiceable = test.Reader.IsServiceable(); Assert.True(isServiceable); } }
public void GetMinClientVersion_ReturnsNullIfNoMinClientVersion() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageCoreAndContentReaderMinimalTestPackage())) { var version = test.Reader.GetMinClientVersion(); Assert.Null(version); } }
public void GetItems_ReturnsEmptyEnumerableIfNoItems() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageCoreAndContentReaderMinimalTestPackage())) { var groups = test.Reader.GetItems("other"); Assert.Empty(groups); } }
public void GetPackageTypes_ReturnsEmptyEnumerableIfNoPackageTypes() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageCoreAndContentReaderMinimalTestPackage())) { var packageTypes = test.Reader.GetPackageTypes(); Assert.Empty(packageTypes); } }
public async Task GetItemsAsync_ReturnsEmptyEnumerableIfNoItems() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageCoreAndContentReaderMinimalTestPackage())) { var groups = await test.Reader.GetItemsAsync("other", CancellationToken.None); Assert.Empty(groups); } }
public async Task GetNuspecAsync_ReturnsReadableStream() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageCoreReaderTestPackage())) using (var stream = await test.Reader.GetNuspecAsync(CancellationToken.None)) { Assert.NotNull(stream); Assert.True(stream.CanRead); } }
public void GetDevelopmentDependency_ReturnsTrueIfDevelopmentDependency() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetDevelopmentDependencyPackage())) { var isDevelopmentDependency = test.Reader.GetDevelopmentDependency(); Assert.True(isDevelopmentDependency); } }
public async Task GetFilesAsync_WithFolder_ReturnsEmptyEnumerableIfNoFiles() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageCoreAndContentReaderMinimalTestPackage())) { var files = await test.Reader.GetFilesAsync("lib", CancellationToken.None); Assert.Empty(files); } }
public void GetNuspec_ReturnsReadableStream() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageCoreReaderTestPackage())) using (var stream = test.Reader.GetNuspec()) { Assert.NotNull(stream); Assert.True(stream.CanRead); } }
public void GetFiles_WithFolder_ReturnsEmptyEnumerableIfNoFiles() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageCoreAndContentReaderMinimalTestPackage())) { var files = test.Reader.GetFiles("lib"); Assert.Empty(files); } }
public async Task GetPackageTypesAsync_ReturnsEmptyEnumerableIfNoPackageTypes() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageCoreAndContentReaderMinimalTestPackage())) { var packageTypes = await test.Reader.GetPackageTypesAsync(CancellationToken.None); Assert.Empty(packageTypes); } }
public void IsServiceable_ReturnsFalseIfNotServiceable() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageCoreAndContentReaderMinimalTestPackage())) { var isServiceable = test.Reader.IsServiceable(); Assert.False(isServiceable); } }
public async Task GetNuspecAsyncFile_ReturnsNuspecPathInPackage() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageCoreReaderTestPackage())) { var filePath = await test.Reader.GetNuspecFileAsync(CancellationToken.None); Assert.Equal(Path.Combine(test.RootDirectoryPath, "Aa.nuspec"), filePath); } }
public void GetMinClientVersion_ReturnsMinClientVersion() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageCoreReaderTestPackage())) { var version = test.Reader.GetMinClientVersion(); Assert.NotNull(version); Assert.Equal("1.2.3", version.ToNormalizedString()); } }
public void GetFiles_WithFolder_ReturnsFiles() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageCoreReaderTestPackage())) { var files = test.Reader.GetFiles("lib"); Assert.NotNull(files); Assert.Equal(2, files.Count()); } }
public async Task GetMinClientVersionAsync_ReturnsMinClientVersion() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageCoreReaderTestPackage())) { var version = await test.Reader.GetMinClientVersionAsync(CancellationToken.None); Assert.NotNull(version); Assert.Equal("1.2.3", version.ToNormalizedString()); } }
public async Task CopyNupkgAsync_Throws() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageCoreReaderTestPackage())) { await Assert.ThrowsAsync <NotImplementedException>( () => test.Reader.CopyNupkgAsync( nupkgFilePath: "a", cancellationToken: CancellationToken.None)); } }
public async Task GetItemsAsync_ReturnsItems() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageContentReaderTestPackage())) { var groups = (await test.Reader.GetItemsAsync("other", CancellationToken.None)).ToArray(); Assert.Equal(1, groups.Length); Assert.Equal(new[] { "other/net45/h", "other/net45/i" }, groups[0].Items); Assert.Equal(".NETFramework,Version=v4.5", groups[0].TargetFramework.DotNetFrameworkName); } }
public void GetBuildItems_ReturnsBuildItems() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageContentReaderTestPackage())) { var groups = test.Reader.GetBuildItems().ToArray(); Assert.Equal(1, groups.Length); Assert.Equal(new[] { "build/net45/a.props", "build/net45/a.targets" }, groups[0].Items); Assert.Equal(".NETFramework,Version=v4.5", groups[0].TargetFramework.DotNetFrameworkName); } }
public void GetItems_ReturnsItems() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageContentReaderTestPackage())) { var groups = test.Reader.GetItems("other").ToArray(); Assert.Equal(1, groups.Length); Assert.Equal(new[] { "other/net45/h", "other/net45/i" }, groups[0].Items); Assert.Equal(".NETFramework,Version=v4.5", groups[0].TargetFramework.DotNetFrameworkName); } }
public void GetLibItems_ReturnsLibItems() { using (var test = PackageReaderTest.Create(TestPackagesCore.GetPackageContentReaderTestPackage())) { var groups = test.Reader.GetLibItems().ToArray(); Assert.Equal(1, groups.Length); Assert.Equal(new[] { "lib/net45/d", "lib/net45/e", "lib/net45/f.dll", "lib/net45/g.dll" }, groups[0].Items); Assert.Equal(".NETFramework,Version=v4.5", groups[0].TargetFramework.DotNetFrameworkName); } }