Skip to content

Commit

Permalink
TweenMainのコンストラクタに対するテストコードを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
upsilon committed Dec 6, 2023
1 parent e7ea8f3 commit a95b338
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions OpenTween.Tests/TweenMainTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,40 @@
using System.Linq;
using System.Text;
using System.Windows.Forms;
using OpenTween.Api;
using OpenTween.Api.DataModel;
using OpenTween.Connection;
using OpenTween.Models;
using OpenTween.Setting;
using OpenTween.Thumbnail;
using Xunit;
using Xunit.Extensions;

namespace OpenTween
{
public class TweenMainTest
{
[WinFormsFact]
public void Initialize_Test()
{
var settings = new SettingManager("");
var tabinfo = new TabInformations();
using var twitterApi = new TwitterApi();
using var twitter = new Twitter(twitterApi);
using var imageCache = new ImageCache();
using var iconAssets = new IconAssetsManager();
var thumbnailGenerator = new ThumbnailGenerator(new(autoupdate: false));
var twitterAppToken = new TwitterAppToken
{
AuthType = APIAuthType.OAuth1,
OAuth1CustomConsumerKey = ApiKey.Create("aaa"),
OAuth1CustomConsumerSecret = ApiKey.Create("bbb"),
};
twitter.Initialize(twitterAppToken, "", "", "", 0L);

using var tweenMain = new TweenMain(settings, tabinfo, twitter, imageCache, iconAssets, thumbnailGenerator);
}

[Fact]
public void GetUrlFromDataObject_XMozUrlTest()
{
Expand Down

0 comments on commit a95b338

Please sign in to comment.