Exemplo n.º 1
0
        public void GetXmlDocument_ShouldReturnCorrectValue(
            [Frozen] IMeasureDuration measureDuration,
            [Greedy] XmlDocumentObserver expectedDocumentObserver,
            INamed named,
            IFixture fixture,
            DateTimeOffset date)
        {
            // arrange
            fixture.Customize <XmlDocumentObserver>(c => c.FromFactory(new MethodInvoker(new GreedyConstructorQuery())));
            var sut = fixture.Create <SeleniumReporter>();

            Mock.Get(measureDuration).Setup(m => m.Now).Returns(date);
            SetupObserver(expectedDocumentObserver, named);
            SetupObserver(sut.XmlDocumentObserver, named);
            var expected = expectedDocumentObserver.GetXmlDocument();
            // act
            var actual = sut.GetXmlDocument();

            // assert
            actual.ToString().Should().Be(expected.ToString());
        }
Exemplo n.º 2
0
 /// <inheritdoc />
 public XDocument GetXmlDocument()
 {
     return(XmlDocumentObserver.GetXmlDocument());
 }