Skip to content

Instantly share code, notes, and snippets.

@alexhiggins732
Created February 10, 2022 22:26
Show Gist options
  • Save alexhiggins732/08d9da1a8727c0ed379ca06b22d6c8e8 to your computer and use it in GitHub Desktop.
Save alexhiggins732/08d9da1a8727c0ed379ca06b22d6c8e8 to your computer and use it in GitHub Desktop.
MudTab Error
using Bunit;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MudBlazor.Services;
using System;
using System.Threading.Tasks;
[TestClass()]
public class ViewerBodyTests : BunitTestContext
{
[TestInitialize]
public void Setup()
{
TestContext = new Bunit.TestContext();
Services.AddMudServices();
JSInterop.Mode = JSRuntimeMode.Loose;
}
[TestMethod()]
public async Task MudTabs_WhenRendering_GeneratesExpectedPropertyMarkup()
{
//Next line throws a System.NullReferenceException:
// Object reference not set to an instance of an object.
var tabs = RenderComponent<MudBlazor.MudTabs>();
Assert.IsNotNull(tabs);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment