Skip to content

Commit bc2460f

Browse files
committed
FluentAssertion removed from chunk1 files
1 parent b9819c0 commit bc2460f

File tree

5 files changed

+34
-39
lines changed

5 files changed

+34
-39
lines changed

tests/Blazor.Diagrams.Core.Tests/Anchors/DynamicAnchorTests.cs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using Blazor.Diagrams.Core.Geometry;
33
using Blazor.Diagrams.Core.Models;
44
using Blazor.Diagrams.Core.Positions;
5-
using FluentAssertions;
65
using Xunit;
76

87
namespace Blazor.Diagrams.Core.Tests.Anchors;
@@ -37,7 +36,7 @@ public void GetPosition_ShouldReturnNull_WhenNodesSizeIsNull()
3736
var position = anchor1.GetPosition(link);
3837

3938
// Assert
40-
position.Should().BeNull();
39+
Assert.Null(position);
4140
}
4241

4342
[Fact]
@@ -72,9 +71,9 @@ public void GetPosition_ShouldReturnClosestPositionToOtherNodesCenter_WhenRouteI
7271
var position = anchor1.GetPosition(link);
7372

7473
// Assert
75-
position.Should().NotBeNull();
76-
position!.X.Should().Be(220);
77-
position.Y.Should().Be(95);
74+
Assert.NotNull(position);
75+
Assert.Equal(220,position!.X);
76+
Assert.Equal(95, position.Y);
7877
}
7978

8079
[Fact]
@@ -109,9 +108,9 @@ public void GetPosition_ShouldReturnClosestPositionToOtherNodesCenterWithOffset_
109108
var position = anchor1.GetPosition(link);
110109

111110
// Assert
112-
position.Should().NotBeNull();
113-
position!.X.Should().Be(230);
114-
position.Y.Should().Be(85);
111+
Assert.NotNull(position);
112+
Assert.Equal(230, position!.X);
113+
Assert.Equal(85, position.Y);
115114
}
116115

117116
[Fact]
@@ -149,9 +148,9 @@ public void GetPosition_ShouldReturnClosestPositionToFirstVertex_WhenRouteIsNotE
149148
});
150149

151150
// Assert
152-
position.Should().NotBeNull();
153-
position!.X.Should().Be(220);
154-
position.Y.Should().Be(125);
151+
Assert.NotNull(position);
152+
Assert.Equal(220, position!.X);
153+
Assert.Equal(125, position.Y);
155154
}
156155

157156
[Fact]
@@ -189,8 +188,8 @@ public void GetPosition_ShouldReturnClosestPositionToLastVertex_WhenRouteIsNotEm
189188
});
190189

191190
// Assert
192-
position.Should().NotBeNull();
193-
position!.X.Should().Be(300);
194-
position.Y.Should().Be(120);
191+
Assert.NotNull(position);
192+
Assert.Equal(300, position!.X);
193+
Assert.Equal(120, position.Y);
195194
}
196195
}

tests/Blazor.Diagrams.Core.Tests/Anchors/ShapeIntersectionAnchorTests.cs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using Blazor.Diagrams.Core.Anchors;
44
using Blazor.Diagrams.Core.Geometry;
55
using Blazor.Diagrams.Core.Models;
6-
using FluentAssertions;
76
using Moq;
87
using Xunit;
98

@@ -27,8 +26,8 @@ public void GetPlainPosition_ShouldReturnNodeCenter()
2726

2827
// Assert
2928
var center = node.GetBounds()!.Center;
30-
position.X.Should().Be(center.X);
31-
position.Y.Should().Be(center.Y);
29+
Assert.Equal(center.X, position.X);
30+
Assert.Equal(center.Y, position.Y);
3231
}
3332

3433
[Fact]
@@ -43,7 +42,7 @@ public void GetPosition_ShouldReturnNull_WhenNodeSizeIsNull()
4342
var position = anchor.GetPosition(link);
4443

4544
// Assert
46-
position.Should().BeNull();
45+
Assert.Null(position);
4746
}
4847

4948
[Fact]
@@ -67,8 +66,8 @@ public void GetPosition_ShouldUseRouteToFindOtherPositionForIntersection_WhenSou
6766

6867
// Assert
6968
var line = args.Single();
70-
line.Start.Should().BeEquivalentTo(route[0]);
71-
line.End.Should().BeEquivalentTo(node.GetBounds()!.Center);
69+
Assert.Equal(route[0],line.Start);
70+
Assert.Equal(node.GetBounds()!.Center, line.End);
7271
}
7372

7473
[Fact]
@@ -93,8 +92,8 @@ public void GetPosition_ShouldUseRouteToFindOtherPositionForIntersection_WhenTar
9392

9493
// Assert
9594
var line = args.Single();
96-
line.Start.Should().BeEquivalentTo(route[^1]);
97-
line.End.Should().BeEquivalentTo(node.GetBounds()!.Center);
95+
Assert.Equal(route[^1],line.Start);
96+
Assert.Equal(node.GetBounds()!.Center,line.End);
9897
}
9998

10099
[Fact]
@@ -120,8 +119,8 @@ public void GetPosition_ShouldCallOtherGetPlainPosition_WhenNoRoute()
120119

121120
// Assert
122121
var line = args.Single();
123-
line.Start.Should().BeEquivalentTo(pt);
124-
line.End.Should().BeEquivalentTo(node.GetBounds()!.Center);
122+
Assert.Equal(pt,line.Start);
123+
Assert.Equal(node.GetBounds()!.Center, line.End);
125124
}
126125

127126
[Fact]
@@ -145,7 +144,7 @@ public void GetPosition_ShouldReturnNull_WhenOtherPositionIsNull()
145144
var position = source.GetPosition(link);
146145

147146
// Assert
148-
position.Should().BeNull();
147+
Assert.Null(position);
149148
}
150149

151150
private class CustomNodeModel : NodeModel

tests/Blazor.Diagrams.Core.Tests/Anchors/SinglePortAnchorTests.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Blazor.Diagrams.Core.Anchors;
22
using Blazor.Diagrams.Core.Geometry;
33
using Blazor.Diagrams.Core.Models;
4-
using FluentAssertions;
54
using Moq;
65
using Xunit;
76

@@ -26,8 +25,8 @@ public void GetPlainPosition_ShouldReturnMiddlePosition()
2625

2726
// Assert
2827
var mp = port.MiddlePosition;
29-
position.X.Should().Be(mp.X);
30-
position.Y.Should().Be(mp.Y);
28+
Assert.Equal(mp.X, position.X);
29+
Assert.Equal(mp.Y, position.Y);
3130
}
3231

3332
[Fact]
@@ -47,7 +46,7 @@ public void GetPosition_ShouldReturnNull_WhenPortNotInitialized()
4746
var position = anchor.GetPosition(link);
4847

4948
// Assert
50-
position.Should().BeNull();
49+
Assert.Null(position);
5150
}
5251

5352
[Fact]
@@ -72,8 +71,8 @@ public void GetPosition_ShouldReturnMiddlePosition_WhenMiddleIfNoMarker()
7271

7372
// Assert
7473
var mp = port.MiddlePosition;
75-
position.X.Should().Be(mp.X);
76-
position.Y.Should().Be(mp.Y);
74+
Assert.Equal(mp.X, position.X);
75+
Assert.Equal(mp.Y, position.Y);
7776
}
7877

7978
[Theory]
@@ -106,8 +105,8 @@ public void GetPosition_ShouldReturnAlignmentBasedPosition_WhenUseShapeAndAlignm
106105
var position = anchor.GetPosition(link)!;
107106

108107
// Assert
109-
position.X.Should().Be(x);
110-
position.Y.Should().Be(y);
108+
Assert.Equal(x, position.X);
109+
Assert.Equal(y, position.Y);
111110
}
112111

113112
[Theory]

tests/Blazor.Diagrams.Core.Tests/Behaviors/DragMovablesBehaviorTests.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using Blazor.Diagrams.Core.Geometry;
44
using Blazor.Diagrams.Core.Models;
55
using Blazor.Diagrams.Core.Options;
6-
using FluentAssertions;
76
using Moq;
87
using Xunit;
98

@@ -79,7 +78,7 @@ public void Behavior_ShouldTriggerMoved()
7978
new PointerEventArgs(150, 150, 0, 0, false, false, false, 0, 0, 0, 0, 0, 0, string.Empty, true));
8079

8180
// Assert
82-
movedTrigger.Should().BeTrue();
81+
Assert.True(movedTrigger);
8382
}
8483

8584
[Fact]
@@ -99,7 +98,7 @@ public void Behavior_ShouldNotTriggerMoved_WhenMovableDidntMove()
9998
new PointerEventArgs(150, 150, 0, 0, false, false, false, 0, 0, 0, 0, 0, 0, string.Empty, true));
10099

101100
// Assert
102-
movedTrigger.Should().BeFalse();
101+
Assert.False(movedTrigger);
103102
}
104103

105104
[Fact]

tests/Blazor.Diagrams.Core.Tests/Positions/ShapeAnglePositionProviderTests.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using Blazor.Diagrams.Core.Geometry;
22
using Blazor.Diagrams.Core.Models;
33
using Blazor.Diagrams.Core.Positions;
4-
using FluentAssertions;
54
using Moq;
65
using Xunit;
76

@@ -39,7 +38,7 @@ public void GetPosition_ShouldUseOffset_WhenProvided()
3938
var position = provider.GetPosition(nodeMock.Object);
4039

4140
// Assert
42-
position!.X.Should().Be(105);
43-
position.Y.Should().Be(40);
41+
Assert.Equal(105, position!.X);
42+
Assert.Equal(40, position.Y);
4443
}
4544
}

0 commit comments

Comments
 (0)