Skip to content

Commit

Permalink
Incompatible framework message fix (#2059)
Browse files Browse the repository at this point in the history
* Fix the error reported for incompatible framework to give complete framework name.
* Fixing the unit tests
* Fixed acceptance test
  • Loading branch information
singhsarab committed Jun 21, 2019
1 parent c09eb2b commit 200b66d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Expand Up @@ -629,7 +629,7 @@ public static IEnumerable<String> FilterCompatibleSources(Architecture chosenPla
string incompatiblityMessage;
var onlyFileName = Path.GetFileName(source);
// Add message for incompatible sources.
incompatiblityMessage = string.Format(CultureInfo.CurrentCulture, OMResources.SourceIncompatible, onlyFileName, actualFramework.Version, actualPlatform);
incompatiblityMessage = string.Format(CultureInfo.CurrentCulture, OMResources.SourceIncompatible, onlyFileName, actualFramework.Name, actualPlatform);

warnings.AppendLine(incompatiblityMessage);
incompatiblityFound = true;
Expand Down
Expand Up @@ -217,7 +217,7 @@ public void UnhandleExceptionExceptionShouldBeLoggedToDiagLogFile(RunnerInfo run
public void IncompatibleSourcesWarningShouldBeDisplayedInTheConsole(RunnerInfo runnerInfo)
{
AcceptanceTestBase.SetTestEnvironment(this.testEnvironment, runnerInfo);
var expectedWarningContains = @"Following DLL(s) do not match framework/platform settings. SimpleTestProject3.dll is built for Framework 4.5.1 and Platform X64";
var expectedWarningContains = @"Following DLL(s) do not match framework/platform settings. SimpleTestProject3.dll is built for Framework .NETFramework,Version=v4.5.1 and Platform X64";
var assemblyPaths =
this.BuildMultipleAssemblyPath("SimpleTestProject3.dll", "SimpleTestProjectx86.dll").Trim('\"');
var arguments = PrepareArguments(assemblyPaths, this.GetTestAdapterPath(), string.Empty, this.FrameworkArgValue, runnerInfo.InIsolationValue);
Expand Down
Expand Up @@ -736,7 +736,7 @@ public void RunSettingsWithDisabledCollectionSettingsAndInlineTestSettingsXml()

private string GetSourceIncompatibleMessage(string source)
{
return string.Format(CultureInfo.CurrentCulture, OMResources.SourceIncompatible, source, sourceFrameworks[source].Version, sourceArchitectures[source]);
return string.Format(CultureInfo.CurrentCulture, OMResources.SourceIncompatible, source, sourceFrameworks[source].Name, sourceArchitectures[source]);
}

private XmlDocument GetXmlDocument(string settingsXml)
Expand Down

0 comments on commit 200b66d

Please sign in to comment.