Skip to content

Commit

Permalink
Fix All the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
OsamaAlRashed committed Nov 2, 2024
1 parent d71f653 commit a85c5c6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Gridazor.Tests/IntegrationTests/GridEditorForTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ public void GridEditorFor_WithNonEnumerableType_ThrowsArgumentException()

public class TestModel
{
public IEnumerable<TestItem> Items { get; set; }
public string NonEnumerableProperty { get; set; }
public required IEnumerable<TestItem> Items { get; set; }
public string NonEnumerableProperty { get; set; } = null!;
}

public class TestItem
{
public string Name { get; set; }
public required string Name { get; set; }
public int Value { get; set; }
}
}
10 changes: 5 additions & 5 deletions Gridazor.Tests/UnitTests/DefaultColumnProviderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ private class TestClass
[Required(true)]
[Hide]
[RowSelection]
public string TestProperty { get; set; }
public required string TestProperty { get; set; }

public int AnotherProperty { get; set; }

Expand All @@ -43,7 +43,7 @@ public void Get_ShouldReturnColumnsWithAttributes()

var firstColumn = columns.FirstOrDefault(c => c.Field == "customField");
firstColumn.Should().NotBeNull();
firstColumn.HeaderName.Should().Be("Custom Header");
firstColumn!.HeaderName.Should().Be("Custom Header");
firstColumn.Field.Should().Be("customField");
firstColumn.Editable.Should().BeFalse();
firstColumn.CellDataType.Should().Be("string");
Expand All @@ -54,7 +54,7 @@ public void Get_ShouldReturnColumnsWithAttributes()

var secondColumn = columns.FirstOrDefault(c => c.Field == "anotherProperty");
secondColumn.Should().NotBeNull();
secondColumn.HeaderName.Should().Be("AnotherProperty");
secondColumn!.HeaderName.Should().Be("AnotherProperty");
secondColumn.Field.Should().Be("anotherProperty");
secondColumn.Editable.Should().BeTrue();
secondColumn.CellDataType.Should().Be("number");
Expand All @@ -65,11 +65,11 @@ public void Get_ShouldReturnColumnsWithAttributes()

var thirdColumn = columns.FirstOrDefault(c => c.Field == "dateProperty");
thirdColumn.Should().NotBeNull();
thirdColumn.HeaderName.Should().Be("DateProperty");
thirdColumn!.HeaderName.Should().Be("DateProperty");
thirdColumn.Field.Should().Be("dateProperty");
thirdColumn.Editable.Should().BeTrue();
thirdColumn.CellDataType.Should().Be("dateString");
thirdColumn.CellEditor.Should().BeEmpty();
thirdColumn.CellEditor.Should().Be("agDateStringCellEditor");
thirdColumn.Required.Should().BeTrue();
thirdColumn.Hide.Should().BeFalse();
thirdColumn.IsRowSelectable.Should().BeFalse();
Expand Down

0 comments on commit a85c5c6

Please sign in to comment.