Пример #1
0
        public void InheritedGuidfulInterface_HasNoGuid_Test()
        {
            Guid guid;
            var  result = AttributeUtilities.TryGetInterfaceGuid(typeof(InheritedGuidfulInterface), out guid);

            AssertFalse(result);
            AssertEquals(Guid.Empty, guid);
        }
Пример #2
0
        public void GuidfulInterface_HasGuid_Test()
        {
            Console.WriteLine(typeof(GuidfulInterface).GetTypeInfo().GetCustomAttribute <GuidAttribute>());

            Guid guid;
            var  result = AttributeUtilities.TryGetInterfaceGuid(typeof(GuidfulInterface), out guid);

            AssertTrue(result);
            AssertEquals(Guid.Parse(kInterfaceGuid), guid);
        }