using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace CoverageFramework.Operator.Selector.Python3
{
	[Export(typeof(IXElementSelector))]
	public class TernaryOperatorSelector : XElementSelector
	{
		protected override IEnumerable<XElement> SelectContainingNull(XElement root)
		{
			return root.Descendants()
				.Where(e => e.Name.LocalName == "test")
				.Select(e => e.Elements().ElementAtOrDefault(2));
		}
	}
}
