Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced RestSharp with Refit #25

Merged
merged 3 commits into from
May 8, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/Novu.Tests/Subscribers/SubscriberUnitTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public async void Should_Update_Subscriber()
subToUpdate.FirstName = "Updated";
subToUpdate.LastName = "Subscriber";

var updatedSub = await _fixture.NovuClient.Subscriber.UpdateSubscriber(subToUpdate);
var updatedSub = await _fixture.NovuClient.Subscriber.UpdateSubscriber(subToUpdate.SubscriberId!, subToUpdate);

// Check to make sure fields changed
Assert.Equal(updatedSub.FirstName, subToUpdate.FirstName);
Expand All @@ -68,7 +68,7 @@ public async void Should_Update_Subscriber()
public async void Should_Delete_Subscriber()
{
var subscriber = await _fixture.GenerateTestSubscriber();
var deleteResponse = await _fixture.NovuClient.Subscriber.DeleteSubscriber(subscriber.SubscriberId);
var deleteResponse = await _fixture.NovuClient.Subscriber.DeleteSubscriber(subscriber.SubscriberId!);

Assert.True(deleteResponse.Data.Acknowledged);
}
Expand All @@ -77,13 +77,11 @@ public async void Should_Delete_Subscriber()
public async void Should_Update_Online_Status()
{
var subscriber = await _fixture.GenerateTestSubscriber();
var updateResponse = await _fixture.NovuClient.Subscriber.UpdateOnlineStatus(subscriber.SubscriberId, new SubscriberOnlineDto
var updateResponse = await _fixture.NovuClient.Subscriber.UpdateOnlineStatus(subscriber.SubscriberId!, new SubscriberOnlineDto
{
IsOnline = true
});

Assert.True(updateResponse.IsOnline);
}


}
2 changes: 1 addition & 1 deletion src/Novu.Tests/Topics/TopicUnitTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public async void Should_Rename_Topic()

var newTopicName = $"test:topic-rename:{Guid.NewGuid().ToString()}";

var result = await client.Topic.RenameTopicAsync(topic.Data.Key, newTopicName);
var result = await client.Topic.RenameTopicAsync(topic.Data.Key, new RenameTopicRequest(newTopicName));

Assert.Equal(newTopicName, result.Data.Name);
}
Expand Down
24 changes: 0 additions & 24 deletions src/Novu/Clients/ApiClient.cs

This file was deleted.

101 changes: 0 additions & 101 deletions src/Novu/Clients/EventClient.cs

This file was deleted.

30 changes: 0 additions & 30 deletions src/Novu/Clients/NotificationsClient.cs

This file was deleted.

122 changes: 0 additions & 122 deletions src/Novu/Clients/SubscriberClient.cs

This file was deleted.

Loading