public void UpdateToggleAsyncShouldUpdateToggle() { _mockToggleRepository .Setup(m => m.GetByIdAsync(1)) .Returns(Task.FromResult(ToggleHelper.ToggleList().First())); var toggle = _mocktoggleService.UpdateToggleAsync(ToggleHelper.ToggleList().First()); toggle.Should().NotBeNull(); }
public void GetAllTogglesFromApplicationAsyncShouldReturnToggles() { _mockToggleRepository .Setup(m => m.GetByIdAsync(3)) .Returns(Task.FromResult(ToggleHelper.ToggleList().First())); var toggle = _mocktoggleService.GetAllTogglesFromApplicationAsync(3, "2.0"); toggle.Should().NotBeNull(); }
public void GetToggleByIdAsyncShouldBeNull() { _mockToggleRepository .Setup(m => m.GetByIdAsync(1)) .Returns(Task.FromResult(ToggleHelper.ToggleList().First())); var result = _mocktoggleService.GetToggleByIdAsync(20); result.Result.Should().BeNull(); }
public async Task GetAllTogglesShouldReturnToggles() { _mockToggleRepository .Setup(m => m.GetAllAsync()) .Returns(Task.FromResult(ToggleHelper.ToggleList())); var toggles = await _mocktoggleService.GetAllTogglesAsync(); toggles.Should().NotBeNull(); }