public void ApplyOverrides_Null_ShouldReturnSameInstance() { var instance = new BaseTypes(new TypeName[0]); var actual = instance.ApplyOverridesFrom(null); Assert.That(actual, Is.SameAs(instance)); }
public void ApplyOverrides_DifferentBaseTypes_ShouldReturnInstanceWithTheOtherBaseTypes() { var typeName = new TypeName("SomeNamespace.IBaseType"); var otherTypeName = new TypeName("SomeNamespace.IOtherBaseType"); var instance = new BaseTypes(new[] { typeName }); var other = new BaseTypes(new[] { otherTypeName }); var actual = instance.ApplyOverridesFrom(other); Assert.That(actual.TypeNames, Is.EquivalentTo(new[] { otherTypeName })); }