• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

curt / Viae / 19527137380

20 Nov 2025 05:53AM UTC coverage: 51.56%. First build
19527137380

push

github

web-flow
feat: provide minimal locus and vestigium views (#1)

62 of 109 branches covered (56.88%)

Branch coverage included in aggregate %.

500 of 981 new or added lines in 61 files covered. (50.97%)

500 of 981 relevant lines covered (50.97%)

19.89 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

64.71
/endpoint/src/Viae.Presentation/Mvc/ViewModels/LocusHtml.cs
1
// Copyright © 2025 Curt Gilman
2
// SPDX-License-Identifier: AGPL-3.0-only
3
// Viae: A geo-centric, journey-focused, federated blog platform
4

5
using Viae.Domain.Models;
6

7
namespace Viae.Presentation.Mvc.ViewModels;
8

9
public class LocusHtml
10
{
11
    public required string Name { get; init; }
12
    public required string Path { get; init; }
13
    public IEnumerable<LocusDistanceHtml>? NearbyLoca { get; set; }
14
    public IEnumerable<VestigiumHtml>? Vestigia { get; set; }
15
    public string? Content { get; set; }
16

17
    public static LocusHtml FromLocus(
18
        Locus locus,
19
        IEnumerable<LocusDistance> nearby,
20
        Func<Locus, string> locusPath,
21
        Func<Vestigium, string> vestigiumPath
22
    )
23
    {
24
        return new()
1✔
25
        {
1✔
26
            Name = locus.Name,
1✔
27
            Path = locusPath(locus),
1✔
28
            NearbyLoca = nearby
1✔
29
                .Where(n => !n.IsReferenceLocus)
1✔
30
                .Select(n => LocusDistanceHtml.FromLocusDistance(n, locusPath)),
1✔
31
            Vestigia = locus.Vestigia.Select(v =>
1✔
32
                VestigiumHtml.FromVestigium(v, vestigiumPath, locusPath)
1✔
33
            ),
1✔
34
        };
1✔
35
    }
36

37
    public static LocusHtml FromLocus(Locus locus, Func<Locus, string> locusPath)
38
    {
NEW
39
        return new()
×
NEW
40
        {
×
NEW
41
            Name = locus.Name,
×
NEW
42
            Path = locusPath(locus),
×
NEW
43
            Content = locus.Content,
×
NEW
44
        };
×
45
    }
46
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc