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

            Controller = new NoteController(
                new Lazy <INoteService>(() => Service));
        }
Esempio n. 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));
        }