Example #1
0
        public void StaticResourceExtensionProvideValue()
        {
            tlog.Debug(tag, $"StaticResourceExtensionProvideValue START");

            try
            {
                ServiceProviderImplemente ss = new ServiceProviderImplemente();

                resourceExtension.Key = "myKey";
                resourceExtension.ProvideValue(ss);
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                tlog.Debug(tag, $"StaticResourceExtensionProvideValue END (OK)");
                Assert.Pass("Caught Exception : passed!");
            }
        }
Example #2
0
        public void StaticResourceExtensionProvideValueWithNullKey()
        {
            tlog.Debug(tag, $"StaticResourceExtensionProvideValueWithNullKey START");

            var serviceProvider = new ServiceProviderImplemente();

            Assert.IsNotNull(serviceProvider, "Can't create success object IServiceProvider");
            Assert.IsInstanceOf <IServiceProvider>(serviceProvider, "Should be an instance of IServiceProvider type.");

            resourceExtension.Key = null;

            try
            {
                resourceExtension.ProvideValue(serviceProvider);
            }
            catch (XamlParseException e)
            {
                tlog.Debug(tag, $"StaticResourceExtensionProvideValueWithNullKey END (OK)");
                Assert.Pass("Caught XamlParseException : passed!");
            }
        }