mirror of
https://github.com/ivuorinen/hiha-arvio.git
synced 2026-03-21 19:03:47 +00:00
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>
This commit is contained in:
51
tests/HihaArvio.Tests/Models/EstimateModeTests.cs
Normal file
51
tests/HihaArvio.Tests/Models/EstimateModeTests.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
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 });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user