コード例 #1
0
        /// <summary>
        /// Create a new instance of this class
        /// </summary>
        /// <param name="view">The view to use</param>
        /// <param name="model">The model to use</param>
        public SourceLocationController(ISourceLocationView view, ICalidusProjectModel model)
        {
            _view = view;

            _model = model;

            _view.DisplayProjectFileLocation(_model.GetProjectFile());
        }
コード例 #2
0
        public void SourceLocationControllerShouldDisplayProjectFileLocation()
        {
            ISourceLocationView  view  = Mocker.DynamicMock <ISourceLocationView>();
            ICalidusProjectModel model = Mocker.DynamicMock <ICalidusProjectModel>();

            Expect.Call(model.GetProjectFile()).Return("test.calidus").Repeat.Once();
            Expect.Call(() => view.DisplayProjectFileLocation("test.calidus")).Repeat.Once();

            Mocker.ReplayAll();

            SourceLocationController controller = new SourceLocationController(view, model);

            Mocker.VerifyAll();
        }