public void WhenFileIsNotSelectedItWillReturnDefaultTypeValue()
        {
            var saveFileDialog = new StubISaveFileDialog
            {
                FileNameGet = () => null
            };
            var file = new MockFile();

            var fileCreator = new StubIFileFactory<MockFile>
            {
                CreateString = s => file
            };

            var fileResult = Setup(saveFileDialog).Save(fileCreator);

            Assert.AreEqual(default(MockFile), fileResult);
        }
        public void WhenFileIsSelectedItWillCreateIt()
        {
            const string fileName = "fileName";
            var saveFileDialog = new StubISaveFileDialog
            {
                FileNameGet = () => fileName
            };
            var file = new MockFile();

            var fileCreator = new StubIFileFactory<MockFile>
            {
                CreateString = s => file
            };

            var fileResult = Setup(saveFileDialog).Save(fileCreator);

            Assert.AreEqual(file, fileResult);
        }