public void WhenIsCalledTwiceItWillReturnSameInstance()
        {
            var window = new StubIWindow
            {
                IsLoadedGet = () => true
            };
            var windowFactory = new StubIWindowFactory { CreateStringUIElement = (s, element) => window };
            var itemEditorWindowFactory = new ItemEditorWindowFactory(new StubIItemEditorClosingHandler(), windowFactory, new StubIItemEditorView());

            Assert.AreEqual(window, itemEditorWindowFactory.Create());
            Assert.AreEqual(window, itemEditorWindowFactory.Create());
        }
        public void CreateWillCallWindowFactory()
        {
            var window = new StubIWindow();
            var windowFactory = new StubIWindowFactory
            {
                CreateStringUIElement = (s, element) => window
            };

            var instance = new ItemEditorWindowFactory(new StubIItemEditorClosingHandler(), windowFactory,
                new StubIItemEditorView());

            Assert.AreEqual(window, instance.Create());
        }