Files
hiha-arvio/tests/HihaArvio.Tests/Models/EstimateModeTests.cs
Ismo Vuorinen 83ec08f14b feat: project setup and core models with TDD
MILESTONE 1 COMPLETE:

Project Setup:
- Create .NET 8 MAUI solution targeting iOS, macOS, and web
- Configure nullable reference types and warnings as errors
- Add required dependencies (MAUI 8.0.3, SQLite, CommunityToolkit.Mvvm)
- Add testing dependencies (xUnit, NSubstitute, FluentAssertions, Coverlet)
- Create comprehensive .editorconfig with C# coding standards
- Update CLAUDE.md with development commands

Core Models (TDD - 48 tests, all passing):
- EstimateMode enum (Work, Generic, Humorous modes)
- EstimateResult model with validation (intensity 0.0-1.0, non-null text)
- ShakeData model with intensity validation
- AppSettings model with defaults (Work mode, max history 10)

Build Status:
- All platforms build successfully (net8.0, iOS, macOS)
- 0 warnings, 0 errors
- Test coverage: 51.28% line, 87.5% branch (models have ~100% coverage)

Per spec: Strict TDD followed (RED-GREEN-REFACTOR), models fully validated

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 12:12:36 +02:00

52 lines
1.1 KiB
C#

using FluentAssertions;
using HihaArvio.Models;
namespace HihaArvio.Tests.Models;
public class EstimateModeTests
{
[Fact]
public void EstimateMode_ShouldHaveWorkValue()
{
// Act
var mode = EstimateMode.Work;
// Assert
mode.Should().Be(EstimateMode.Work);
((int)mode).Should().Be(0);
}
[Fact]
public void EstimateMode_ShouldHaveGenericValue()
{
// Act
var mode = EstimateMode.Generic;
// Assert
mode.Should().Be(EstimateMode.Generic);
((int)mode).Should().Be(1);
}
[Fact]
public void EstimateMode_ShouldHaveHumorousValue()
{
// Act
var mode = EstimateMode.Humorous;
// Assert
mode.Should().Be(EstimateMode.Humorous);
((int)mode).Should().Be(2);
}
[Fact]
public void EstimateMode_ShouldHaveExactlyThreeValues()
{
// Act
var values = Enum.GetValues<EstimateMode>();
// Assert
values.Should().HaveCount(3);
values.Should().Contain(new[] { EstimateMode.Work, EstimateMode.Generic, EstimateMode.Humorous });
}
}