mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-25 06:05:46 +03:00
Added workshop publish tag tests
This commit is contained in:
parent
6bd0af6c5a
commit
dcca1b8737
@ -373,6 +373,9 @@ public void CreatePublish()
|
||||
item.Title = "Facepunch.Steamworks Unit test";
|
||||
item.Tags.Add( "Apple" );
|
||||
item.Tags.Add( "Banana" );
|
||||
|
||||
try
|
||||
{
|
||||
item.Publish();
|
||||
|
||||
while ( item.Publishing )
|
||||
@ -387,9 +390,29 @@ public void CreatePublish()
|
||||
|
||||
Console.WriteLine( "item.Id: {0}", item.Id );
|
||||
|
||||
using ( var Query = client.Workshop.CreateQuery() )
|
||||
{
|
||||
Query.FileId.Add( item.Id );
|
||||
Query.Run();
|
||||
|
||||
Query.Block();
|
||||
|
||||
var itemInfo = Query.Items[0];
|
||||
|
||||
Assert.AreEqual( itemInfo.Id, item.Id );
|
||||
Assert.AreEqual( itemInfo.OwnerId, client.SteamId );
|
||||
Assert.AreEqual( itemInfo.Title, item.Title );
|
||||
Assert.IsTrue( itemInfo.Tags.Contains( "Apple" ), "Missing Tag" );
|
||||
Assert.IsTrue( itemInfo.Tags.Contains( "Banana" ), "Missing Tag" );
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
Console.WriteLine( "Deleting: {0}", item.Id );
|
||||
item.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void UserQuery()
|
||||
|
Loading…
Reference in New Issue
Block a user