[TestCase(ApplePlatform.MacCatalyst, "osx-x64")] // valid RID for another platform public void InvalidRuntimeIdentifier(ApplePlatform platform, string runtimeIdentifier) { var project = "MySimpleApp"; Configuration.IgnoreIfIgnoredPlatform(platform); var project_path = GetProjectPath(project, platform: platform); Clean(project_path); var properties = new Dictionary <string, string> (verbosity); properties ["RuntimeIdentifier"] = runtimeIdentifier; var rv = DotNet.AssertBuildFailure(project_path, properties); var errors = BinLog.GetBuildMessages(rv.BinLogPath).Where(v => v.Type == BuildLogEventType.Error).ToArray(); Assert.AreEqual(1, errors.Length, "Error count"); Assert.AreEqual($"The RuntimeIdentifier '{runtimeIdentifier}' is invalid.", errors [0].Message, "Error message"); }
public void InvalidRuntimeIdentifiers(ApplePlatform platform, string runtimeIdentifiers) { var project = "MySimpleApp"; Configuration.IgnoreIfIgnoredPlatform(platform); var project_path = GetProjectPath(project, platform: platform); Clean(project_path); var properties = new Dictionary <string, string> (verbosity); properties ["RuntimeIdentifiers"] = runtimeIdentifiers; var rv = DotNet.AssertBuildFailure(project_path, properties); var errors = BinLog.GetBuildMessages(rv.BinLogPath).Where(v => v.Type == BuildLogEventType.Error).ToArray(); Assert.AreEqual(1, errors.Length, "Error count"); Assert.AreEqual($"Building for all the runtime identifiers '{runtimeIdentifiers}' at the same time isn't possible, because they represent different platform variations.", errors [0].Message, "Error message"); }