Added workshop publish tag tests

This commit is contained in:
Garry Newman 2016-10-26 17:08:39 +01:00
parent 6bd0af6c5a
commit dcca1b8737

View File

@ -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()