public void ShowsChildContent_OnSecondRender()
        {
            using var context = new TestContext();
            context.Services.AddSingleton(new Mock <IEventLoggingService>().Object);

            IRenderedComponent <PreRenderLoadingMessage> cut = context.RenderComponent <PreRenderLoadingMessage>(parameters =>
                                                                                                                 parameters
                                                                                                                 .Add(p => p.UnitTestMode, true)
                                                                                                                 .AddChildContent("<div>Hello World</div>")
                                                                                                                 );

            Assert.DoesNotContain("<div>Hello World</div>", cut.Markup);

            cut.Render();
            Assert.Contains("<div>Hello World</div>", cut.Markup);
        }
Exemplo n.º 2
0
 public void TimeLeftOnTimerIs(TimeSpan timeLeft)
 {
     _index.Render();
     Assert.Equal(timeLeft, TimeLeft());
 }