public void GetStatusSeverity_PackageReferenceIsInstalled_ReturnsNull() { CreatePackageReference(); CreatePackageReferenceNode(); TaskSeverity?status = node.GetStatusSeverity(); Assert.IsNull(status); }
public void GetLabel_PackageReferenceNeedsReinstallationButHasUpdate_DoesNotShowUpdateInformation() { CreatePackageReference( packageId: "MyPackage", packageVersion: "1.0.2", requireReinstallation: true); CreatePackageReferenceNode( installed: true, updatedPackage: new PackageIdentity("MyPackage", new NuGetVersion("1.2.3.4"))); string label = node.GetLabel(); string secondaryLabel = node.GetSecondaryLabel(); Assert.AreEqual("MyPackage", label); Assert.AreEqual("(1.0.2)", secondaryLabel); Assert.AreEqual(TaskSeverity.Warning, node.GetStatusSeverity()); Assert.AreEqual("Package needs retargeting", node.GetStatusMessage()); Assert.AreEqual(IconId.Null, node.GetStatusIconId()); }