mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-27 07:05:50 +03:00
Added Friends.OpenWebOverlay test
This commit is contained in:
parent
e48a0db798
commit
2287e5527b
@ -113,43 +113,20 @@ public async Task GetFriendsAvatars()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void FriendListWithoutRefresh()
|
public async Task OpenWebOverlay()
|
||||||
{
|
{
|
||||||
using ( var client = new Facepunch.Steamworks.Client( 252490 ) )
|
if ( SteamUtils.IsOverlayEnabled )
|
||||||
{
|
Console.WriteLine( "Overlay Is Enabled" );
|
||||||
Assert.IsTrue( client.IsValid );
|
else
|
||||||
|
Console.WriteLine( "Overlay Is Not Enabled" );
|
||||||
|
|
||||||
foreach ( var friend in client.Friends.All )
|
SteamFriends.OpenWebOverlay( "https://www/google.com/" );
|
||||||
{
|
|
||||||
Console.WriteLine( "{0}: {1} (Friend:{2}) (Blocked:{3})", friend.Id, friend.Name, friend.IsFriend, friend.IsBlocked );
|
await Task.Delay( 2000 );
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
public void CachedAvatar()
|
|
||||||
{
|
|
||||||
using (var client = new Facepunch.Steamworks.Client(252490))
|
|
||||||
{
|
|
||||||
Assert.IsTrue(client.IsValid);
|
|
||||||
|
|
||||||
var friend = client.Friends.All.First();
|
|
||||||
|
|
||||||
var image = client.Friends.GetCachedAvatar( Steamworks.Friends.AvatarSize.Medium, friend.Id );
|
|
||||||
|
|
||||||
if (image != null)
|
|
||||||
{
|
|
||||||
Assert.AreEqual(image.Width, 64);
|
|
||||||
Assert.AreEqual(image.Height, 64);
|
|
||||||
Assert.AreEqual(image.Data.Length, image.Width * image.Height * 4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
public static void DrawImage( Image img )
|
public static void DrawImage( Image img )
|
||||||
{
|
{
|
||||||
var grad = " -:+#";
|
var grad = " -:+#";
|
||||||
|
Loading…
Reference in New Issue
Block a user