ExpressionTreeCloner now can create shallow field-based clones of objects without a default constructor (before this, only deep clones worked); search-and-replace fix - some comments referred to something called 'propertys'; all cloners now correctly handle being passed null values (a clone of 'null' is also 'null' per definition)

git-svn-id: file:///srv/devel/repo-conversion/nusu@246 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
Markus Ewald 2012-02-08 17:38:20 +00:00
parent 15300676ba
commit d091061baa
8 changed files with 167 additions and 22 deletions

View file

@ -36,6 +36,13 @@ namespace Nuclex.Support.Cloning {
this.cloneFactory = new SerializationCloner();
}
/// <summary>Verifies that cloning a null object simply returns null</summary>
[Test]
public void CloningNullYieldsNull() {
Assert.IsNull(this.cloneFactory.DeepFieldClone<object>(null));
Assert.IsNull(this.cloneFactory.DeepPropertyClone<object>(null));
}
/// <summary>Verifies that clones of primitive types can be created</summary>
[Test]
public void PrimitiveTypesCanBeCloned() {