Skip to content

Commit

Permalink
Added Test That Duplicate Layer Works
Browse files Browse the repository at this point in the history
  • Loading branch information
CPKreu committed Mar 14, 2021
1 parent 92ea451 commit 6022619
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions PixiEditorTests/ModelsTests/DataHoldersTests/DocumentTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,21 @@ public void TestThatDocumentGetsAddedToRecentlyOpenedList()
Assert.Contains(viewModel.FileSubViewModel.RecentlyOpened, x => x == testFilePath);
}

[Fact]
public void TestThatDupliacteLayerWorks()
{
const string layerName = "New Layer";

Document document = new (10, 10);

document.AddNewLayer(layerName);
Layer duplicate = document.DuplicateLayer(0);

Assert.Equal(document.Layers[1], duplicate);
Assert.Equal(layerName + " (1)", duplicate.Name);
Assert.True(duplicate.IsActive);
}

[Fact]
public void TestThatCorrectLayerSuffixIsSet()
{
Expand Down

0 comments on commit 6022619

Please sign in to comment.