public void AuthorController_CreateAnObject() { // arrange var mock2 = new Mock <IConfiguration>(); string expected = "AuthorController"; var mock = new Mock <ILibService>(); // act AuthorController controller = new AuthorController(mock.Object, mock2.Object); //assert Assert.IsNotNull(controller); Assert.AreEqual(expected, controller.GetType().Name); }