|
|
@ -12,6 +12,7 @@ using Moq; |
|
|
using System; |
|
|
using System; |
|
|
using System.Linq; |
|
|
using System.Linq; |
|
|
using Xunit; |
|
|
using Xunit; |
|
|
|
|
|
using Avalonia.Rendering; |
|
|
|
|
|
|
|
|
namespace Avalonia.Controls.UnitTests.Presenters |
|
|
namespace Avalonia.Controls.UnitTests.Presenters |
|
|
{ |
|
|
{ |
|
|
@ -56,6 +57,7 @@ namespace Avalonia.Controls.UnitTests.Presenters |
|
|
|
|
|
|
|
|
var parentMock = new Mock<Control>(); |
|
|
var parentMock = new Mock<Control>(); |
|
|
parentMock.As<IContentPresenterHost>(); |
|
|
parentMock.As<IContentPresenterHost>(); |
|
|
|
|
|
parentMock.As<IRenderRoot>(); |
|
|
parentMock.As<IStyleRoot>(); |
|
|
parentMock.As<IStyleRoot>(); |
|
|
|
|
|
|
|
|
(target as ISetLogicalParent).SetParent(parentMock.Object); |
|
|
(target as ISetLogicalParent).SetParent(parentMock.Object); |
|
|
@ -100,6 +102,7 @@ namespace Avalonia.Controls.UnitTests.Presenters |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
var parentMock = new Mock<Control>(); |
|
|
var parentMock = new Mock<Control>(); |
|
|
|
|
|
parentMock.As<IRenderRoot>(); |
|
|
parentMock.As<IStyleRoot>(); |
|
|
parentMock.As<IStyleRoot>(); |
|
|
parentMock.As<ILogical>().SetupGet(l => l.IsAttachedToLogicalTree).Returns(true); |
|
|
parentMock.As<ILogical>().SetupGet(l => l.IsAttachedToLogicalTree).Returns(true); |
|
|
|
|
|
|
|
|
@ -144,6 +147,7 @@ namespace Avalonia.Controls.UnitTests.Presenters |
|
|
|
|
|
|
|
|
var parentMock = new Mock<Control>(); |
|
|
var parentMock = new Mock<Control>(); |
|
|
parentMock.As<IContentPresenterHost>(); |
|
|
parentMock.As<IContentPresenterHost>(); |
|
|
|
|
|
parentMock.As<IRenderRoot>(); |
|
|
parentMock.As<IStyleRoot>(); |
|
|
parentMock.As<IStyleRoot>(); |
|
|
|
|
|
|
|
|
(target as ISetLogicalParent).SetParent(parentMock.Object); |
|
|
(target as ISetLogicalParent).SetParent(parentMock.Object); |
|
|
|