//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldClearAuthenticationCache() throws Throwable //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldClearAuthenticationCache() { LdapServer.ConfidentialityRequired = true; using (EmbeddedTestCertificates ignore = new EmbeddedTestCertificates()) { // When RestartServerWithOverriddenSettings(SecuritySettings.ldap_server.name(), "ldaps://localhost:10636"); // Then AssertAuth("tank", "abc123"); ChangeLDAPPassword("tank", "abc123", "123abc"); // When logging in without clearing cache // Then AssertAuthFail("tank", "123abc"); AssertAuth("tank", "abc123"); // When clearing cache and logging in ClearAuthCacheFromDifferentConnection(); // Then AssertAuthFail("tank", "abc123"); AssertAuth("tank", "123abc"); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldClearAuthorizationCache() throws Throwable //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldClearAuthorizationCache() { LdapServer.ConfidentialityRequired = true; using (EmbeddedTestCertificates ignore = new EmbeddedTestCertificates()) { // When RestartServerWithOverriddenSettings(SecuritySettings.ldap_server.name(), "ldaps://localhost:10636"); // Then using (Driver driver = ConnectDriver("tank", "abc123")) { AssertReadSucceeds(driver); AssertWriteSucceeds(driver); } ChangeLDAPGroup("tank", "abc123", "reader"); // When logging in without clearing cache using (Driver driver = ConnectDriver("tank", "abc123")) { // Then AssertReadSucceeds(driver); AssertWriteSucceeds(driver); } // When clearing cache and logging in ClearAuthCacheFromDifferentConnection(); // Then using (Driver driver = ConnectDriver("tank", "abc123")) { AssertReadSucceeds(driver); AssertWriteFails(driver); } } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @BeforeClass public static void classSetup() public static void ClassSetup() { _embeddedTestCertificates = new EmbeddedTestCertificates(); }