public void GetDrivers_WithRightData_Test_listOfDrivers() { var mockDriveService = new Mock <IDriveService>(); this.controller.DriveService = mockDriveService.Object; string[] result = { "d", "c" }; mockDriveService.Setup(services => services.GetDrives()).Returns(result); var json = controller.GetDrives(); Assert.AreEqual(json.Data, result); }