Skip to content

Commit

Permalink
Revert "failed to make test"
Browse files Browse the repository at this point in the history
This reverts commit d7766ee99830598a7537d9126d7d23949ed37fa4.
  • Loading branch information
danmoseley committed Jun 26, 2023
1 parent 9a7206e commit 46a91b8
Showing 1 changed file with 0 additions and 26 deletions.
Expand Up @@ -591,32 +591,6 @@ public void TestCompleteHandlerShouldNotDivideByZeroWhenThereAre0TestResults()
Assert.AreEqual(0, _htmlLogger.TestRunDetails.Summary.PassPercentage);
}

[TestMethod]
public void TestCompleteHandlerShouldHandleInvalidCharReferences()
{
System.Diagnostics.Debugger.Break();
VisualStudio.TestPlatform.Extensions.HtmlLogger.HtmlLogger hl = new(_mockFileHelper.Object, new Mock<IHtmlTransformer>().Object, new DataContractSerializer(typeof(TestRunDetails)));
hl.Initialize(_events.Object, _parameters);

MemoryStream xmlStream = new();
_mockFileHelper.Setup(x => x.GetStream(It.IsAny<string>(), FileMode.Open, FileAccess.Read)).Returns(xmlStream);
_mockFileHelper.Setup(x => x.Exists(It.IsAny<string>())).Returns(false);

MemoryStream htmlStream = new();
_mockFileHelper.Setup(x => x.GetStream(It.IsAny<string>(), FileMode.OpenOrCreate, FileAccess.ReadWrite)).Returns(htmlStream);
_mockFileHelper.Setup(x => x.Exists(It.IsAny<string>())).Returns(false);

var testCase = new TestCase("TestName", new Uri("some://uri"), "TestSource");
var testResult = new ObjectModel.TestResult(testCase) { Outcome = TestOutcome.Failed };
testResult.Messages.Add(new(TestResultMessage.StandardErrorCategory, "\uFFFF"));

hl.TestResultHandler(new object(), new TestResultEventArgs(testResult));

hl.TestRunCompleteHandler(new object(), new TestRunCompleteEventArgs(null, false, true, null, null, null, TimeSpan.Zero));

//Assert.AreEqual(htmlFileContent, new StreamReader(htmlStream).ReadToEnd());
}

private static TestCase CreateTestCase(string testCaseName)
{
return new TestCase(testCaseName, new Uri("some://uri"), "DummySourceFileName");
Expand Down

0 comments on commit 46a91b8

Please sign in to comment.