Sha256: 006aeaec5745327d7d92ccb3cc7d640d819f91b45778982243c9ec1fcde79a72

Contents?: true

Size: 1.63 KB

Versions: 28

Compression:

Stored size: 1.63 KB

Contents

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;

namespace Generators.Input
{
    public class CanonicalDataCase
    {
        public IDictionary<string, dynamic> Properties { get; set; }
        public IDictionary<string, dynamic> Input { get; set; }
        public dynamic Expected { get; set; }

        public string Property { get; set; }
        public string Description { get; set; }
        public string[] DescriptionPath { get; set; }

        public bool UseVariablesForInput { get; set; }
        public bool UseVariableForExpected { get; set; }
        public bool UseVariablesForConstructorParameters { get; set; }
        public bool UseVariableForTested { get; set; }
        public bool UseFullDescriptionPath { get; set; }

        public TestedMethodType TestedMethodType { get; set; }
        public Type ExceptionThrown { get; set; }

        public HashSet<string> InputParameters { get; } = new HashSet<string>();
        public HashSet<string> ConstructorInputParameters { get; } = new HashSet<string>();

        public void SetInputParameters(params string[] properties)
        {
            InputParameters.Clear();
            InputParameters.UnionWith(properties);

            ConstructorInputParameters.ExceptWith(properties);
        }

        public void SetConstructorInputParameters(params string[] properties)
        {
            ConstructorInputParameters.Clear();
            ConstructorInputParameters.UnionWith(properties);

            InputParameters.ExceptWith(properties);

            TestedMethodType = TestedMethodType.Instance;
        }
    }
}

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/csharp/generators/Input/CanonicalDataCase.cs
trackler-2.2.1.179 tracks/csharp/generators/Input/CanonicalDataCase.cs
trackler-2.2.1.178 tracks/csharp/generators/Input/CanonicalDataCase.cs
trackler-2.2.1.177 tracks/csharp/generators/Input/CanonicalDataCase.cs
trackler-2.2.1.176 tracks/csharp/generators/Input/CanonicalDataCase.cs
trackler-2.2.1.175 tracks/csharp/generators/Input/CanonicalDataCase.cs
trackler-2.2.1.174 tracks/csharp/generators/Input/CanonicalDataCase.cs
trackler-2.2.1.173 tracks/csharp/generators/Input/CanonicalDataCase.cs
trackler-2.2.1.172 tracks/csharp/generators/Input/CanonicalDataCase.cs
trackler-2.2.1.171 tracks/csharp/generators/Input/CanonicalDataCase.cs
trackler-2.2.1.170 tracks/csharp/generators/Input/CanonicalDataCase.cs
trackler-2.2.1.169 tracks/csharp/generators/Input/CanonicalDataCase.cs
trackler-2.2.1.167 tracks/csharp/generators/Input/CanonicalDataCase.cs
trackler-2.2.1.166 tracks/csharp/generators/Input/CanonicalDataCase.cs
trackler-2.2.1.165 tracks/csharp/generators/Input/CanonicalDataCase.cs
trackler-2.2.1.164 tracks/csharp/generators/Input/CanonicalDataCase.cs
trackler-2.2.1.163 tracks/csharp/generators/Input/CanonicalDataCase.cs
trackler-2.2.1.162 tracks/csharp/generators/Input/CanonicalDataCase.cs
trackler-2.2.1.161 tracks/csharp/generators/Input/CanonicalDataCase.cs
trackler-2.2.1.160 tracks/csharp/generators/Input/CanonicalDataCase.cs