public async Task GetCase_ShouldCallFosteringService() { // Arrange _mockCaseService.Setup(_ => _.GetCase(It.IsAny <string>())) .ReturnsAsync(new FosteringCase()); // Act await _case.GetCase("12345"); // Assert _mockCaseService.Verify(_ => _.GetCase(It.IsAny <string>()), Times.Once); }
public CaseDetails(int id) { InitializeComponent(); @case = caseCtrl.GetCase(id); this.DataContext = @case; List <Category> categories = new CategoryController().GetCategories(); @case.Category = categories.Find(c => c.Id == @case.Category.Id); cbCategory.ItemsSource = categories; List <Status> statuses = new StatusController().GetStatuses(); @case.Status = statuses.Find(s => s.Id == @case.Status.Id); cbStatus.ItemsSource = statuses; FillComments(); }