INNER CODE UNIT · C#

FactoryServiceTests

nozzlegear/ShopifySharp · ShopifySharp.Extensions.DependencyInjection.Tests/FactoryServiceTests.cs:10

public class FactoryServiceTests
{
    private readonly ShopifyApiCredentials _credentials = new("some-shopify-domain", "some-access-token");
    private readonly ShopifyPartnerApiCredentials _partnerCredentials = new(7, "some-access-token");

    private static (Type FactoryClassType, Type ServiceInterfaceType)[] GetFactoryServiceTypes()
    {
        // Get all factory classes in the ShopifySharp.Factories namespace
        var factoryTypes = Assembly.GetAssembly(typeof(GraphServiceFactory))!
            .GetTypes()
            .Where(t =>
                t is
                {
                    IsClass: true,
                    Namespace: "ShopifySharp.Factories",
                    // Special handling to exclude the PartnerServiceFactory, which does not use the IServiceFactory interface
                    Name: not "PartnerServiceFactory"
                } &&

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…