public Task <Activity> GetActivityAsync(string id) { return(Task.Run( () => { using (var stream = EmbeddedResources.Load(string.Format(RuntasticFileFormat, id))) { var serializer = new XmlSerializer(typeof(TrainingCenterDatabase)); var @object = serializer.Deserialize(stream); var database = (TrainingCenterDatabase)@object; return database.Activities.Activity[0]; } })); }
public void EmbeddedResources_ContainsVersionString() { EmbeddedResources.Load(); Assert.IsFalse(string.IsNullOrWhiteSpace(EmbeddedResources.Version)); }