< Summary

Information
Class: Elsa.Expressions.JavaScript.TypeDefinitions.Builders.VariableDefinitionBuilder
Assembly: Elsa.Expressions.JavaScript
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions.JavaScript/TypeDefinitions/Builders/VariableDefinitionBuilder.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 6
Coverable lines: 6
Total lines: 22
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%210%
Name(...)100%210%
Type(...)100%210%
Build()100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions.JavaScript/TypeDefinitions/Builders/VariableDefinitionBuilder.cs

#LineLine coverage
 1using Elsa.Expressions.JavaScript.TypeDefinitions.Models;
 2
 3namespace Elsa.Expressions.JavaScript.TypeDefinitions.Builders;
 4
 5public class VariableDefinitionBuilder
 6{
 07    private readonly VariableDefinition _variableDefinition = new();
 8
 9    public VariableDefinitionBuilder Name(string name)
 10    {
 011        _variableDefinition.Name = name;
 012        return this;
 13    }
 14
 15    public VariableDefinitionBuilder Type(string type)
 16    {
 017        _variableDefinition.Type = type;
 018        return this;
 19    }
 20
 021    public VariableDefinition Build() => new(_variableDefinition.Name, _variableDefinition.Type);
 22}