示例#1
0
        public void IExraDataContainerExtensions_GetExtraDataOrDefaultValue_Convert()
        {
            var container = new DependencyInjectionContainer();

            container.SetExtraData("Hello", "10");

            var value = container.GetExtraDataOrDefaultValue("Hello", 1);

            Assert.Equal(10, value);
        }
示例#2
0
        public void IExraDataContainerExtensions_GetExtraDataOrDefaultValue_Use_Default()
        {
            var container = new DependencyInjectionContainer();

            container.SetExtraData("Hello", "World");

            var value = container.GetExtraDataOrDefaultValue("Good", "Bye");

            Assert.Equal("Bye", value);
        }