コード例 #1
0
        public void CanCreateFormViewModel()
        {
            // Establish Context
            SlideFolderFormViewModel viewModelToExpect = new SlideFolderFormViewModel();

            // Act
            SlideFolderFormViewModel viewModelRetrieved =
                slideFolderManagementService.CreateFormViewModel();

            // Assert
            viewModelRetrieved.ShouldNotBeNull();
            viewModelRetrieved.SlideFolder.ShouldBeNull();
        }
コード例 #2
0
        public void CanCreateFormViewModelForSlideFolder()
        {
            // Establish Context
            SlideFolderFormViewModel viewModelToExpect = new SlideFolderFormViewModel();

            SlideFolder slideFolder =
                SlideFolderInstanceFactory.CreateValidTransientSlideFolder();

            slideFolderRepository.Expect(r => r.Get(1))
            .Return(slideFolder);

            // Act
            SlideFolderFormViewModel viewModelRetrieved =
                slideFolderManagementService.CreateFormViewModelFor(1);

            // Assert
            viewModelRetrieved.ShouldNotBeNull();
            viewModelRetrieved.SlideFolder.ShouldNotBeNull();
            viewModelRetrieved.SlideFolder.ShouldEqual(slideFolder);
        }