* Update gitignore * Move csproj * Update project references * Update solutions * Update build scripts * Tests used to share editorconfig with projects in src * Fix broken tests. * Stop copying around .editorconfig merged root one with linting * csharp_style_expression_bodied -> suggestion * Move StyleCop rulesets to matching directories and update shared build properties * Remove legacy build files, update NuGet.cofig and solution files * Restore myget source * Clean up .gitignore * Update .gitignore * Move new test classes to tests after merge * Gitignore + nuget config * Move new test Co-authored-by: Ronald Barendse <ronald@barend.se>
32 lines
799 B
C#
32 lines
799 B
C#
using System;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Xml.Linq;
|
|
using System.Xml.XPath;
|
|
|
|
namespace Umbraco.Cms.Tests.Integration.Umbraco.Examine.Lucene.UmbracoExamine
|
|
{
|
|
// TODO: This is ultra hack and still left over from legacy but still works for testing atm
|
|
internal class ExamineDemoDataMediaService
|
|
{
|
|
public ExamineDemoDataMediaService()
|
|
{
|
|
_doc = XDocument.Parse(TestFiles.media);
|
|
}
|
|
|
|
#region IMediaService Members
|
|
|
|
public XDocument GetLatestMediaByXpath(string xpath)
|
|
{
|
|
var xdoc = XDocument.Parse("<media></media>");
|
|
xdoc.Root.Add(_doc.XPathSelectElements(xpath));
|
|
return xdoc;
|
|
}
|
|
|
|
#endregion
|
|
|
|
private readonly XDocument _doc;
|
|
}
|
|
}
|