mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-05-07 04:09:41 +03:00
Added workshop publish tag tests
This commit is contained in:
parent
6bd0af6c5a
commit
dcca1b8737
@ -373,6 +373,9 @@ namespace Facepunch.Steamworks.Test
|
|||||||
item.Title = "Facepunch.Steamworks Unit test";
|
item.Title = "Facepunch.Steamworks Unit test";
|
||||||
item.Tags.Add( "Apple" );
|
item.Tags.Add( "Apple" );
|
||||||
item.Tags.Add( "Banana" );
|
item.Tags.Add( "Banana" );
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
item.Publish();
|
item.Publish();
|
||||||
|
|
||||||
while ( item.Publishing )
|
while ( item.Publishing )
|
||||||
@ -387,9 +390,29 @@ namespace Facepunch.Steamworks.Test
|
|||||||
|
|
||||||
Console.WriteLine( "item.Id: {0}", item.Id );
|
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();
|
item.Delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void UserQuery()
|
public void UserQuery()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user