Skip to content

Commit fbe273a

Browse files
committed
Fix RelationTests for net9.0
1 parent a76014f commit fbe273a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Parse.Tests/RelationTests.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public async Task AddRelationToUserAsync_ThrowsException_WhenUserIsNull()
114114
public async Task AddRelationToUserAsync_ThrowsException_WhenRelationFieldIsNull()
115115
{
116116
var user = new ParseUser() { Username = "TestUser", Password = "TestPass", Services = Client.Services };
117-
await user.SignUpAsync();
117+
118118
var relatedObjects = new List<ParseObject>
119119
{
120120
new ParseObject("Friend", Client.Services) { ["name"] = "Friend1" }
@@ -180,7 +180,6 @@ public async Task GetUserRelationsAsync_ThrowsException_WhenUserIsNull()
180180
public async Task GetUserRelationsAsync_ThrowsException_WhenRelationFieldIsNull()
181181
{
182182
var user = new ParseUser() { Username = "TestUser", Password = "TestPass", Services = Client.Services };
183-
await user.SignUpAsync();
184183

185184
await Assert.ThrowsExceptionAsync<ArgumentException>(() => UserManagement.GetUserRelationsAsync(user, null));
186185
}
@@ -193,7 +192,6 @@ public async Task AddRelationToUserAsync_ThrowsException_WhenRelatedObjectIsUnsa
193192
{
194193
// Arrange: Create and sign up a test user.
195194
var user = new ParseUser() { Username = "TestUser", Password = "TestPass", Services = Client.Services };
196-
await user.SignUpAsync();
197195

198196
// Create an unsaved Friend object (do NOT call SaveAsync).
199197
var unsavedFriend = new ParseObject("Friend", Client.Services) { ["name"] = "UnsavedFriend" };
@@ -202,6 +200,7 @@ public async Task AddRelationToUserAsync_ThrowsException_WhenRelatedObjectIsUnsa
202200
// Act & Assert: Expect an exception when trying to add an unsaved object.
203201
await Assert.ThrowsExceptionAsync<ArgumentException>(() =>
204202
UserManagement.AddRelationToUserAsync(user, "friends", relatedObjects));
203+
205204
}
206205

207206

0 commit comments

Comments
 (0)