// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using Avalonia.Controls;
using Avalonia.Controls.Presenters;
using Avalonia.UnitTests;
using Xunit;
namespace Avalonia.Markup.Xaml.UnitTests.Xaml
{
public class DataTemplateTests
{
[Fact]
public void DataTemplate_Can_Contain_Name()
{
using (UnitTestApplication.Start(TestServices.StyledWindow))
{
var xaml = @"
";
var loader = new AvaloniaXamlLoader();
var window = (Window)loader.Load(xaml);
var target = window.FindControl("target");
window.ApplyTemplate();
target.ApplyTemplate();
((ContentPresenter)target.Presenter).UpdateChild();
Assert.IsType