Package model

Examples of model.Server


     * Test of getIP_Address method, of class Server.
     */
    @Test
    public void testGetIP_Address() {
        System.out.println("getIP_Address");
        Server instance = new Server();
        String expResult = "";
        String result = instance.getURL();
        assertEquals(expResult, result);
    }
View Full Code Here


     */
    @Test
    public void testSetIP_Address() {
        System.out.println("setIP_Address");
        String ip_address = "";
        Server instance = new Server();
        instance.setURL(ip_address);
    }
View Full Code Here

     */
    @Test
    public void testSetID() {
        System.out.println("setID");
        int id = 0;
        Server instance = new Server();
        instance.setID(id);
    }
View Full Code Here

     */
    @Test
    public void testGetByIP() {
        System.out.println("getByIP");
        String Ip = "";
        Server instance = new Server();
        Server expResult = null;
        Server result = instance.getByIP(Ip);
        assertEquals(expResult, result);
    }
View Full Code Here

     */
    @Test
    public void testGet() {
        System.out.println("get");
        int id = 0;
        Server instance = new Server();
        Server expResult = null;
        Server result = instance.get(id);
        assertEquals(expResult, result);
    }
View Full Code Here

     * Test of save method, of class Server.
     */
    @Test
    public void testSave() {
        System.out.println("save");
        Server instance = new Server();
        boolean expResult = false;
        boolean result = instance.save();
        assertEquals(expResult, result);
    }
View Full Code Here

        mock_server.start();

        // Create example server
        System.out.println(Server.get("http://www.google.com"));
        if (Server.get("http://www.google.com") == -2) {
            Server server1 = new Server("http://www.google.com");
            server1.save();
        }
       
        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
View Full Code Here

     */
    @Test
    public void testRemove() {
        System.out.println("remove");
        int id = 0;
        Server instance = new Server();
        boolean expResult = false;
        boolean result = instance.remove(id);
        assertEquals(expResult, result);

    }
View Full Code Here

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed

         URL = jTextField2.getText();
           
         Server serv = new Server(URL);
         serv.save();
         UptimeMart.getModel().addElement(serv);
         this.setVisible(false);
    }//GEN-LAST:event_jButton1ActionPerformed
View Full Code Here

    private String upPath = "/green_dot.png";
    private String downPath = "/red_dot.png";
    private boolean currentStatus = true;
    @Override
    public Component getListCellRendererComponent(JList list, Object server, int index, boolean isSelected, boolean cellHasFocus) {
        Server thisServer = null;
        thisServer = (Server) server;
        GridLayout gridLayout = new GridLayout(0, 2);
        setSize(10, 200);
        setLayout(gridLayout);
        removeAll();
       
        add(new JLabel(thisServer.getURL()));
        if (thisServer.isCurrentStatus()) {
            add(new JLabel(createImageIcon(upPath, "up")));
        } else {
            add(new JLabel(createImageIcon(downPath, "down")));

        }
View Full Code Here

TOP

Related Classes of model.Server

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.