Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
ivarne committed Jan 4, 2024
1 parent 698500c commit 92bc3f9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,10 @@ public DataAnnotationValidator(IHttpContextAccessor httpContextAccessor, IObject
}

/// <summary>
/// Dummy implementation to satisfy interface, We use <see cref="CanValidateDataType" /> instead
/// Run Data annotation validation on all data types with app logic
/// </summary>
public string DataType => "*";

/// <summary>
/// Run validator for all data types.
/// </summary>
public bool CanValidateDataType(string dataType) => true;

/// <summary>
/// Disable incremental validation for this validator.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@ namespace Altinn.App.Core.Features.Validation.Default;
/// </summary>
public class DefaultDataElementValidator : IDataElementValidator
{
/// <inheritdoc />
public string DataType => "*";

/// <summary>
/// Runs on all data elements to validate metadata and file scan results.
/// Run validations on all data elements
/// </summary>
public bool CanValidateDataType(DataType dataType) => true;
public string DataType => "*";

/// <inheritdoc />
public Task<List<ValidationIssue>> ValidateDataElement(Instance instance, DataElement dataElement, DataType dataType)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,6 @@ private class TestClass
public TestClass? NestedProperty { get; set; }
}

[Fact]
public void CanValidateDataType()
{
// Act
var result = _validator.CanValidateDataType(DataAnnotationsTestFixture.DataType);

// Assert
Assert.True(result);
}

[Fact]
public void ShouldRunForIncrementalValidation()
{
Expand Down

0 comments on commit 92bc3f9

Please sign in to comment.