DjvuNet.Tests.Xunit.DjvuDataRowTestCase.GetSkipReason(IAttributeInfo)

Here are the examples of the csharp api DjvuNet.Tests.Xunit.DjvuDataRowTestCase.GetSkipReason(IAttributeInfo) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

19 Source : DjvuDataRowTestCase.cs
with MIT License
from DjvuNet

protected override void Initialize()
        {
            base.Initialize();

            var factAttribute = TestMethod.Method.GetCustomAttributes(typeof(FactAttribute)).First();
            var baseDisplayName = factAttribute.GetNamedArgument<string>("DisplayName") ?? BaseDisplayName;

            DisplayName = GetDisplayName(factAttribute, baseDisplayName);
            SkipReason = GetSkipReason(factAttribute);

            foreach (var traitAttribute in GetTraitAttributesData(TestMethod))
            {
                var discovererAttribute = traitAttribute
                    .GetCustomAttributes(typeof(TraitDiscovererAttribute)).FirstOrDefault();

                if (discovererAttribute != null)
                {
                    var discoverer = ExtensibilityPointFactory.GetTraitDiscoverer(_MessageSink, discovererAttribute);
                    if (discoverer != null)
                        foreach (var keyValuePair in discoverer.GetTraits(traitAttribute))
                            Add(Traits, keyValuePair.Key, keyValuePair.Value);
                }
                else
                    _MessageSink.OnMessage(
                        new DiagnosticMessage(
                            $"Trait attribute on '{DisplayName}' did not have [TraitDiscoverer]"));
            }
        }