//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldEnableShufflingOfDelegate() throws Throwable //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldEnableShufflingOfDelegate() { // given Config config = Config.builder().withSetting(CausalClusteringSettings.load_balancing_plugin, DUMMY_PLUGIN_NAME).withSetting(CausalClusteringSettings.load_balancing_shuffle, "true").build(); // when LoadBalancingProcessor plugin = LoadBalancingPluginLoader.Load(mock(typeof(TopologyService)), mock(typeof(LeaderLocator)), NullLogProvider.Instance, config); // then assertTrue(plugin is ServerShufflingProcessor); assertTrue((( ServerShufflingProcessor )plugin).@delegate() is DummyLoadBalancingPlugin); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldFindServerPoliciesPlugin() throws Throwable //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldFindServerPoliciesPlugin() { // given Config config = Config.builder().withSetting(CausalClusteringSettings.load_balancing_plugin, ServerPoliciesPlugin.PLUGIN_NAME).withSetting(CausalClusteringSettings.load_balancing_shuffle, "false").build(); // when LoadBalancingProcessor plugin = LoadBalancingPluginLoader.Load(mock(typeof(TopologyService)), mock(typeof(LeaderLocator)), NullLogProvider.Instance, config); // then assertTrue(plugin is ServerPoliciesPlugin); assertEquals(ServerPoliciesPlugin.PLUGIN_NAME, (( ServerPoliciesPlugin )plugin).pluginName()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldReturnSelectedPlugin() throws Throwable //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldReturnSelectedPlugin() { // given Config config = Config.builder().withSetting(CausalClusteringSettings.load_balancing_plugin, DUMMY_PLUGIN_NAME).withSetting(CausalClusteringSettings.load_balancing_shuffle, "false").build(); // when LoadBalancingProcessor plugin = LoadBalancingPluginLoader.Load(mock(typeof(TopologyService)), mock(typeof(LeaderLocator)), NullLogProvider.Instance, config); // then assertTrue(plugin is DummyLoadBalancingPlugin); assertEquals(DUMMY_PLUGIN_NAME, (( DummyLoadBalancingPlugin )plugin).PluginName()); assertTrue((( DummyLoadBalancingPlugin )plugin).WasInitialized); }
public ServerShufflingProcessor(LoadBalancingProcessor @delegate) { this.@delegate = @delegate; }