diff --git a/src/NuGetizer.Tests/CreatePackageTests.cs b/src/NuGetizer.Tests/CreatePackageTests.cs index 3d21b3b8..49df4ee6 100644 --- a/src/NuGetizer.Tests/CreatePackageTests.cs +++ b/src/NuGetizer.Tests/CreatePackageTests.cs @@ -154,6 +154,18 @@ public void when_creating_package_has_development_dependency_metadata_then_manif [Fact] public void when_creating_package_has_license_expression_then_manifest_has_license() { + task.Contents = new[] + { + // Need at least one dependency or content file for the generation to succeed. + new TaskItem("Newtonsoft.Json", new Metadata + { + { MetadataName.PackageId, task.Manifest.GetMetadata("Id") }, + { MetadataName.PackFolder, PackFolderKind.Dependency }, + { MetadataName.Version, "8.0.0" }, + { MetadataName.TargetFramework, "net45" } + }), + }; + task.Manifest.SetMetadata("LicenseUrl", ""); task.Manifest.SetMetadata("LicenseExpression", "MIT");