Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Grand.Modules.Tests.Themes;
/// <summary>
/// The spec's header centre is "the store name as a serif wordmark (or logo)": a merchant who
/// uploaded a logo keeps it under Nordic; the wordmark is for stores without one.
/// </summary>
[TestClass]
public class NordicLogoTests
{
private static string Logo => File.ReadAllText(Path.Combine(Installer.RepositoryPaths.Root,
"src", "Plugins", "Theme.Nordic", "Views", "Nordic", "Shared", "Partials", "Logo.cshtml"));
[TestMethod]
public void Logo_RendersTheMerchantPictureWhenOneIsSet()
{
StringAssert.Contains(Logo, "LogoPictureId");
StringAssert.Contains(Logo, "<img");
}
[TestMethod]
public void Logo_FallsBackToTheWordmark()
{
StringAssert.Contains(Logo, "nordic-wordmark");
StringAssert.Contains(Logo, "CurrentStore.Name");
}
}