public virtual void Arrange() //virtual means it can be overridden
        {
            Service = new FakeNoteService();

            Controller = new NoteController(
                new Lazy <INoteService>(() => Service));
        }
예제 #2
0
        public virtual void Arrange()
        {
            NoteService = new FakeNoteService();

            // When unit testing, we can test the controller logic in isolation by manually injecting a fake note service rather than use a real one.
            Controller = new NoteController(
                new Lazy <INoteService>(() => NoteService));
        }