Skip to content

Commit

Permalink
Merge pull request #42 from prplecake/remove-raindropio
Browse files Browse the repository at this point in the history
  • Loading branch information
prplecake authored Mar 30, 2023
2 parents 694a6de + fe21b8e commit f18976b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 109 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using BookmarkSync.Infrastructure.Services.Bookmarking;
using BookmarkSync.Infrastructure.Services.Bookmarking.LinkAce;
using BookmarkSync.Infrastructure.Services.Bookmarking.Pinboard;
using BookmarkSync.Infrastructure.Services.Bookmarking.Raindropio;
using Microsoft.Extensions.Configuration;

namespace BookmarkSync.Infrastructure.Tests.Services;
Expand Down Expand Up @@ -87,56 +86,4 @@ public void GetBookmarkingService_Pinboard()
Assert.AreEqual(typeof(PinboardBookmarkingService), obj.GetType());
Assert.IsInstanceOfType(obj, typeof(PinboardBookmarkingService));
}
[TestMethod]
public void GetBookmarkingService_Raindropio()
{
// Arrange
var config = new Dictionary<string, string?>
{
{
"App:Bookmarking:Service", "Raindropio"
},
{
"App:Bookmarking:ApiToken", "228CCE89-7E7B-4D15-936A-39892AE86110"
}
};
var configuration = new ConfigurationBuilder()
.AddInMemoryCollection(config)
.Build();

IConfigManager configManager = new ConfigManager(configuration);

// Act
var obj = BookmarkingService.GetBookmarkingService(configManager);

// Assert
Assert.AreEqual(typeof(RaindropioBookmarkingService), obj.GetType());
Assert.IsInstanceOfType(obj, typeof(RaindropioBookmarkingService));
}
[TestMethod]
public void GetBookmarkingService_Raindropio2()
{
// Arrange
var config = new Dictionary<string, string?>
{
{
"App:Bookmarking:Service", "Raindrop.io"
},
{
"App:Bookmarking:ApiToken", "228CCE89-7E7B-4D15-936A-39892AE86110"
}
};
var configuration = new ConfigurationBuilder()
.AddInMemoryCollection(config)
.Build();

IConfigManager configManager = new ConfigManager(configuration);

// Act
var obj = BookmarkingService.GetBookmarkingService(configManager);

// Assert
Assert.AreEqual(typeof(RaindropioBookmarkingService), obj.GetType());
Assert.IsInstanceOfType(obj, typeof(RaindropioBookmarkingService));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using BookmarkSync.Core.Interfaces;
using BookmarkSync.Infrastructure.Services.Bookmarking.LinkAce;
using BookmarkSync.Infrastructure.Services.Bookmarking.Pinboard;
using BookmarkSync.Infrastructure.Services.Bookmarking.Raindropio;

namespace BookmarkSync.Infrastructure.Services.Bookmarking;

Expand Down Expand Up @@ -37,7 +36,6 @@ public static IBookmarkingService GetBookmarkingService(IConfigManager configMan
{
"LinkAce" => new LinkAceBookmarkingService(configManager),
"Pinboard" => new PinboardBookmarkingService(configManager),
"Raindropio" or "Raindrop.io" => new RaindropioBookmarkingService(configManager),
_ => throw new InvalidOperationException("Bookmark service either not provided or unknown")
};
}
Expand Down

This file was deleted.

0 comments on commit f18976b

Please sign in to comment.