public void AppendRdnsReturnsUpdatedInstance() { // Fixture setup var dn = new DN(new Rdn(NamingAttribute.Cn, new LdapName("John Doe"))); // Exercise system dn = dn.Append(new Rdn(NamingAttribute.Ou, new LdapName("Users"))); // Verify outcome dn.ToString().Should().Be("CN=John Doe,OU=Users"); }
public void DnIsImmutable() { // Fixture setup var sourceDn = new DN(new Rdn(NamingAttribute.Cn, new LdapName("John Doe"))); // Exercise system var targetDn = sourceDn.Append(new Rdn(NamingAttribute.Ou, new LdapName("Users"))); // Verify outcome targetDn.Should().NotBeSameAs(sourceDn); }