public void FindPackageByName_WildcardWithNoPackage_ReturnsNull() { var packageList = new PackageDetails[] { }; var foundPackage = packageList.FindPackageByName("*"); Assert.IsNull(foundPackage); }
public void FindPackageByName_NameOfOneOfManyPackages_ReturnsNamedPackage() { var targetPackageName = "foo"; var targetPackage = CreatePackageWithName(targetPackageName); var packageList = new PackageDetails[] { CreatePackageWithName("making up the numbers"), targetPackage }; var foundPackage = packageList.FindPackageByName(targetPackageName); Assert.AreEqual(targetPackage, foundPackage); }