Fix SaveLoadSaveTest blowing up harder when a test failure happened.
This commit is contained in:
@@ -58,13 +58,17 @@ namespace Content.IntegrationTests.Tests
|
|||||||
var failed = TestContext.CurrentContext.Result.Assertions.FirstOrDefault();
|
var failed = TestContext.CurrentContext.Result.Assertions.FirstOrDefault();
|
||||||
if (failed != null)
|
if (failed != null)
|
||||||
{
|
{
|
||||||
var path1 = Path.Combine(userData.RootDir!,rp1.ToRelativeSystemPath());
|
var oneTmp = Path.GetTempFileName();
|
||||||
var path2 = Path.Combine(userData.RootDir!,rp2.ToRelativeSystemPath());
|
var twoTmp = Path.GetTempFileName();
|
||||||
TestContext.AddTestAttachment(path1);
|
|
||||||
TestContext.AddTestAttachment(path2);
|
File.WriteAllText(oneTmp, one);
|
||||||
|
File.WriteAllText(twoTmp, two);
|
||||||
|
|
||||||
|
TestContext.AddTestAttachment(oneTmp, "First save file");
|
||||||
|
TestContext.AddTestAttachment(twoTmp, "Second save file");
|
||||||
TestContext.Error.WriteLine("Complete output:");
|
TestContext.Error.WriteLine("Complete output:");
|
||||||
TestContext.Error.WriteLine(path1);
|
TestContext.Error.WriteLine(oneTmp);
|
||||||
TestContext.Error.WriteLine(path2);
|
TestContext.Error.WriteLine(twoTmp);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user