Skip to content

SQLLite.Net.Test.Win32 failing in CreateUniqueIndexes() at CheckIndex(db, indexes, "UX_Uno_bool", true, "Cuatro"); #58

@IanMercer

Description

@IanMercer

Trying to get the unit tests to run locally and I'm seeing several fail including the CreateUniqueIndexes test where the index uses named parameters:

        [Indexed(Name = "UX_Uno_bool", Unique = true)]
        public int Cuatro { get; set; }

The GetIndices() method fails because there are no ConstructorArguments. attribute has two NamedArguments but no ConstructorArguments.

public static IEnumerable<IndexedAttribute> GetIndices(MemberInfo p)
    {
        var indexedAttributes = new List<IndexedAttribute>();
        foreach (var attribute in p.CustomAttributes)
        {
            if (attribute.AttributeType == typeof(IndexedAttribute))
            {
                var arguments = attribute.ConstructorArguments;
                var name = (string)arguments[0].Value;                    <---- EXCEPTION HERE
                var order = (int)arguments[1].Value;
                indexedAttributes.Add(new IndexedAttribute(name, order));
            }
        }
        return indexedAttributes;
      }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions