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

LBreedlove / Queuebal.Expressions / 18445802153

12 Oct 2025 03:17PM UTC coverage: 96.312% (-0.3%) from 96.599%
18445802153

push

github

web-flow
refactor mutations so params have access to source data (#24)

442 of 447 branches covered (98.88%)

Branch coverage included in aggregate %.

87 of 95 new or added lines in 17 files covered. (91.58%)

2 existing lines in 2 files now uncovered.

2692 of 2807 relevant lines covered (95.9%)

422.91 hits per line

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

88.89
/Queuebal.Expressions.Mutations/ToUpperMutation.cs
1
using Queuebal.Json;
2

3
namespace Queuebal.Expressions.Mutations;
4

5

6
public class ToUpperMutation : Mutation
7
{
8
    public static string MutationType => "ToUpper";
5✔
9

10
    /// <summary>
11
    /// Indicates if the string should be converted to uppercase
12
    /// using the casing rules of the invariant culture.
13
    /// </summary>
14
    public IExpression UseInvariantCulture { get; set; } = new ValueExpression { Value = new JSONValue(true) };
8✔
15

16
    protected override JSONValue EvaluateMutation(ExpressionContext context, JSONValue originalValue, JSONValue sourceData)
17
    {
4✔
18
        if (!originalValue.IsString)
4✔
19
        {
1✔
20
            throw new InvalidOperationException("ToUpperMutation can only be applied to a string input value.");
1✔
21
        }
22

23
        var useInvariantCulture = UseInvariantCulture.Evaluate(context, sourceData);
3✔
24
        if (!useInvariantCulture.IsBoolean)
3✔
UNCOV
25
        {
×
NEW
26
            throw new InvalidOperationException("The UseInvariantCulture expression must evaluate to a boolean value.");
×
27
        }
28

29
        if (useInvariantCulture.BooleanValue)
3✔
30
        {
2✔
31
            return originalValue.StringValue.ToUpperInvariant();
2✔
32
        }
33

34
        // If UseInvariantCulture is false, use the current culture
35
        return originalValue.StringValue.ToUpper();
1✔
36
    }
3✔
37
}
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