public void OnStartUp_WhenCalled_SetsSelectedDocument()
        {
            var document = new DocumentViewModel();

            documentVersionsWindowViewModel.OnStartUp(document);

            Assert.Equal(document, documentVersionsWindowViewModel.SelectedDocument);
        }
コード例 #2
0
        public DocumentVersionsWindow(object selectedDocument)
        {
            InitializeComponent();

            var documentVersionService = (Application.Current as App).DocumentVersionService;
            var fileHelper             = (Application.Current as App).FileHelper;
            var windowHelper           = (Application.Current as App).WindowHelper;
            var mapper = (Application.Current as App).Mapper;

            ViewModel = new DocumentVersionsWindowViewModel(documentVersionService, fileHelper, windowHelper, mapper);
            ViewModel.OnStartUp(selectedDocument as DocumentViewModel);
        }