예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void canFormatListOfStrings()
        public virtual void CanFormatListOfStrings()
        {
            string entity         = _json.assemble(ListRepresentation.strings("hello", "world"));
            string expectedString = JsonHelper.createJsonFrom(Arrays.asList("hello", "world"));

            assertEquals(expectedString, entity);
        }
예제 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @GET @Path(DOMAINS_PATH) public javax.ws.rs.core.Response listDomains() throws NullPointerException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual Response ListDomains()
        {
            MBeanServer        server  = ManagementFactory.PlatformMBeanServer;
            ListRepresentation domains = ListRepresentation.strings(server.Domains);

            return(_output.ok(domains));
        }