public void ShallowClone() { var blockType = new BlockType { Name = "some block type" }; var result = blockType.Clone(false); Assert.Equal(result.Name, blockType.Name); }
public void ShouldCloneObject() { var blockType = new BlockType(); blockType.Blocks.Add(new Block()); var result = blockType.Clone() as BlockType; Assert.NotNull( result ); Assert.NotNull( result.Blocks ); Assert.IsNotEmpty( result.Blocks ); }
public void ShouldCopyProperties() { var blockType = new BlockType { Name = "some block type" }; var result = blockType.Clone(false); Assert.AreEqual(result.Name, blockType.Name); }
public void Clone() { var blockType = new BlockType(); blockType.Blocks.Add( new Block() ); var result = blockType.Clone() as BlockType; Assert.NotNull( result ); // TODO: Fix Clone() to include all child objects //Assert.NotNull( result.Blocks ); //Assert.NotEmpty( result.Blocks ); }
public void ShouldCloneObject() { var blockType = new BlockType(); blockType.Blocks.Add(new Block()); var result = blockType.Clone() as BlockType; Assert.NotNull(result); Assert.NotNull(result.Blocks); Assert.IsNotEmpty(result.Blocks); }
public void Clone() { var blockType = new BlockType(); blockType.Blocks.Add(new Block()); var result = blockType.Clone() as BlockType; Assert.NotNull(result); // TODO: Fix Clone() to include all child objects //Assert.NotNull( result.Blocks ); //Assert.NotEmpty( result.Blocks ); }
public void ShouldCopyProperties() { var blockType = new BlockType { Name = "some block type" }; var result = blockType.Clone( false ); Assert.AreEqual( result.Name, blockType.Name ); }
public void ShallowClone() { var blockType = new BlockType { Name = "some block type" }; var result = blockType.Clone( false ); Assert.Equal( result.Name, blockType.Name ); }