public void AddingMembersIsBinaryBackwardsCompatible() { var publicRoundTrippedNodes = FilteredApiNode.For(new PrinterConfig("", ""), RoundTrippedProjectApi); var compatibility = GetApiCompatiblity(publicRoundTrippedNodes, ThisProjectApi); Assert.That(compatibility, Is.EqualTo(BinaryApiCompatibility.BackwardsCompatible)); }
public void RemovingMembersIsBinaryIncompatible() { var publicRoundTrippedNodes = FilteredApiNode.For(new PrinterConfig("", ""), RoundTrippedProjectApi); var compatibility = GetApiCompatiblity(ThisProjectApi, publicRoundTrippedNodes); Assert.That(compatibility, Is.EqualTo(BinaryApiCompatibility.Incompatible)); }
private static async Task WritePublicApi(PublicApiWriter publicApiWriter, PrinterConfig printerConfig, string solutionOrProjectFilePath, string humanReadableFileName, string jsonFileName, CancellationToken cancellationToken) { var solutionNodes = await ApiReader.ReadApiFromProjects(solutionOrProjectFilePath, cancellationToken); var filteredNodes = FilteredApiNode.For(printerConfig, solutionNodes).ToList(); var writeHumanReadable = publicApiWriter.WriteHumanReadable(filteredNodes, new FileInfo(humanReadableFileName), cancellationToken); JsonSerialization.WriteJson(filteredNodes, new FileInfo(jsonFileName)); await writeHumanReadable; }
private static IApiNode GetFiltered(PrinterConfig printerConfig, IApiNode assemblyNode) { return(FilteredApiNode.For(printerConfig, new[] { assemblyNode }).Single()); }