Example #1
0
        public void WhenUsingFactory_ThenCanCreateSingleton()
        {
            var s1 = AmbientSingleton.Create("foo");
            var s2 = AmbientSingleton.Create(() => "bar");

            Assert.Equal("foo", s1.Value);
            Assert.Equal("bar", s2.Value);
        }