[InlineData("1.0.0-beta", "2.0.0-beta", false)] // different public void LibraryIdentity_Equals_Version(string versionA, string versionB, bool expected) { // Arrange var identityA = new LibraryIdentity("packageA", new NuGetVersion(versionA), LibraryType.Package); var identityB = new LibraryIdentity("packageA", new NuGetVersion(versionB), LibraryType.Package); // Act var actual = identityA.Equals(identityB); // Assert Assert.Equal(expected, actual); }
[InlineData("package", "assembly", false)] // different public void LibraryIdentity_Equals_LibraryType(string typeA, string typeB, bool expected) { // Arrange var version = new NuGetVersion("1.0.0"); var identityA = new LibraryIdentity("packageA", version, LibraryType.Parse(typeA)); var identityB = new LibraryIdentity("packageA", version, LibraryType.Parse(typeB)); // Act var actual = identityA.Equals(identityB); // Assert Assert.Equal(expected, actual); }
[InlineData("packageA", "packageA ", false)] // different public void LibraryIdentity_Equals_Name(string nameA, string nameB, bool expected) { // Arrange var version = new NuGetVersion("1.0.0"); var identityA = new LibraryIdentity(nameA, version, LibraryType.Package); var identityB = new LibraryIdentity(nameB, version, LibraryType.Package); // Act var actual = identityA.Equals(identityB); // Assert Assert.Equal(expected, actual); }