public void Get_AllEquipments_Success() { // arrange var equipment = new Equipment() { Id = 1, Name = "Test Equipment", IsActive = true, ClinicId = 1 }; var equipmentList = (IEnumerable <Equipment>) new List <Equipment> { equipment }; var response = new Response <IEnumerable <Equipment> > { IsSucceed = true, Result = equipmentList, ErrorMessage = null }; _equipmentService.Setup(x => x.GetAll()).Returns(response); // act var clinics = _equipmentsController.Get(); // assert Assert.AreEqual(response, clinics); }
public void Get_CallWith_NoParameter_ShouldReturn_OkResponse() { var result = _controller.Get(); Assert.True(result is OkObjectResult); }