// Expert guidance on unit testing for the Pomodoro Time Tracker. Activates when working with tests, test coverage, or testable code patterns.
| name | unit-test-specialist |
| description | Expert guidance on unit testing for the Pomodoro Time Tracker. Activates when working with tests, test coverage, or testable code patterns. |
| allowed-tools | ["Read","Glob","Grep"] |
Activates when: Tests, unit tests, test coverage, or testable code mentioned.
@/.claude/prompts/dotnet/testing/aaa-pattern.md
@/.claude/prompts/dotnet/testing/test-naming.md
@/.claude/prompts/dotnet/testing/moq-cheatsheet.md
@/.claude/prompts/dotnet/testing/fluentassertions.md
PomodoroTimeTracker.Tests/
โโโ ViewModels/ (158 tests)
โ โโโ PomodoroViewModelTests.cs (60)
โ โโโ RegularTimerViewModelTests.cs (40)
โ โโโ StopWatchViewModelTests.cs (30)
โ โโโ ...
โโโ Application/Services/ (148 tests)
โ โโโ PomodoroSessionServiceTests.cs
โ โโโ AudioServiceTests.cs (35)
โ โโโ ...
โโโ Infrastructure/Repositories/ (71 tests)
public class ViewModelTests
{
private readonly Mock<IService> _service;
private readonly Mock<IDispatcherTimer> _timer;
private readonly ViewModel _viewModel;
public ViewModelTests()
{
_service = new Mock<IService>();
_timer = new Mock<IDispatcherTimer>();
_viewModel = new ViewModel(_service.Object, _timer.Object);
}
[Fact]
public void Property_WhenChanged_UpdatesDependentProperties()
{
// Arrange
var propertyChanges = new List<string>();
_viewModel.PropertyChanged += (s, e) => propertyChanges.Add(e.PropertyName!);
// Act
_viewModel.SomeProperty = "value";
// Assert
propertyChanges.Should().Contain("DependentProperty");
}
}
public class ServiceTests : IDisposable
{
private readonly ApplicationDbContext _context;
private readonly Service _service;
public ServiceTests()
{
var options = new DbContextOptionsBuilder<ApplicationDbContext>()
.UseInMemoryDatabase(Guid.NewGuid().ToString())
.Options;
_context = new ApplicationDbContext(options);
_service = new Service(new UnitOfWork(_context));
}
public void Dispose()
{
_context.Database.EnsureDeleted();
_context.Dispose();
}
}
When tests are added/modified, update TEST_SUMMARY.md with current counts.