//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldReportThirdPartyPackagesAtSpecifiedMount() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldReportThirdPartyPackagesAtSpecifiedMount() { // Given WebServer webServer = mock(typeof(WebServer)); CommunityNeoServer neoServer = mock(typeof(CommunityNeoServer)); when(neoServer.BaseUri()).thenReturn(new URI("http://localhost:7575")); when(neoServer.WebServer).thenReturn(webServer); Database database = mock(typeof(Database)); when(neoServer.Database).thenReturn(database); Config config = mock(typeof(Config)); IList <ThirdPartyJaxRsPackage> jaxRsPackages = new List <ThirdPartyJaxRsPackage>(); string path = "/third/party/package"; jaxRsPackages.Add(new ThirdPartyJaxRsPackage("org.example.neo4j", path)); when(config.Get(ServerSettings.third_party_packages)).thenReturn(jaxRsPackages); // When ThirdPartyJAXRSModule module = new ThirdPartyJAXRSModule(webServer, config, NullLogProvider.Instance, neoServer); module.Start(); // Then verify(webServer).addJAXRSPackages(any(typeof(System.Collections.IList)), anyString(), anyCollection()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldRegisterASingleUri() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldRegisterASingleUri() { WebServer webServer = mock(typeof(WebServer)); CommunityNeoServer neoServer = mock(typeof(CommunityNeoServer)); when(neoServer.BaseUri()).thenReturn(new URI("http://localhost:7575")); when(neoServer.WebServer).thenReturn(webServer); IDictionary <string, string> @params = new Dictionary <string, string>(); string managementPath = "/db/manage"; @params[ServerSettings.management_api_path.name()] = managementPath; Config config = Config.defaults(@params); when(neoServer.Config).thenReturn(config); ManagementApiModule module = new ManagementApiModule(webServer, config); module.Start(); verify(webServer).addJAXRSClasses(anyListOf(typeof(string)), anyString(), any()); }