@Test
  public void testCommentFrameByteArrayByteArray() {
    CommentFrame frame = new CommentFrame(header, content);

    assertEquals(0x00, frame.getEncoding());
    assertEquals("pol", frame.getLanguage());
    assertEquals("", frame.getShortDescription());
    assertEquals("comment", frame.getActualText());
  }
  @Override
  public void actionPerformed(ActionEvent e) {
    if (e.getSource() == comment) {
      CommentFrame mf = new CommentFrame("电商用户行为分析");
      mf.setBounds(200, 100, 800, 600);
      mf.setVisible(true);
      mf.setResizable(false);
      mf.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    }

    if (e.getSource() == buy) {
      BuyFrame bf = new BuyFrame("购买行为分析");
      bf.setBounds(200, 100, 800, 600);
      bf.setVisible(true);
      bf.setResizable(false);
      bf.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    }
  }
  @Test
  public void testGetContentBytes() {
    CommentFrame frame = new CommentFrame();

    //		frame.setType("COMM");
    //
    //		frame.setTagAlterPreservation(true);
    //		frame.setFileAlterPreservation(true);
    //		frame.setReadOnly(true);
    //		frame.setGroupingIdentity(true);
    //		frame.setCompression(true);
    //		frame.setEncryption(true);

    frame.setLanguage("pol");
    frame.setEncoding((byte) 0x00);
    frame.setShortDescription("");
    frame.setActualText("comment");

    assertArrayEquals(content, frame.getContentBytes());
  }
Beispiel #4
0
 /** {@inheritDoc} */
 public String getComment() {
   CommentFrame cf =
       (CommentFrame) getFrame(FrameType.getId(FrameType.COMMENT, header.getVersion()));
   return cf == null ? "" : cf.getComment();
 }