public void GivenAddititveApiChangeThenMinorVersionIncreases() { var oldApi = ApiBuilder.CreateApi("1"); var comparison = ApiNodeComparison.Compare(new[] { oldApi }, new[] { oldApi, ApiBuilder.CreateApi("") }); Assert.That(comparison.GetNewSemanticVersion(new Version(1, 0, 0, 0)).AssemblyFileVersion, Is.EqualTo(new Version(1, 1, 0, 0))); }
public async Task UnchangingPartOfApiDoesNotAppearInComparison() { var sameApi = ApiBuilder.CreateApi("same"); var comparison = ApiNodeComparison.Compare(new [] { sameApi, ApiBuilder.CreateApi("1") }, new [] { sameApi, ApiBuilder.CreateApi("2") }); var differenceString = await comparison.GetDifferencesString(); Assert.That(differenceString, Does.Not.Contain("same")); }
private static IReadOnlyCollection <ApiNodeComparison> Compare(IApiNode oldApi, IApiNode newApi) { return(ApiNodeComparison.Compare(new[] { oldApi }, new[] { newApi })); }
private BinaryApiCompatibility GetApiCompatiblity(IEnumerable <IApiNode> originalApi, IEnumerable <IApiNode> newApi) { var binaryApiComparer = new BinaryApiComparer(); return(binaryApiComparer.GetApiChangeType(ApiNodeComparison.Compare(originalApi, newApi))); }