Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

20
LINES

< > BotCompany Repo | #1018726 // Test setOneLineFileInfoField + getOneLineFileInfoField (OK)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (6109L/43K).

1  
!7
2  
3  
p-exp {
4  
  File f = programFile("bla.bla");
5  
  setOneLineFileInfoField(f, "size", 1024);
6  
  assertEqualsVerbose("1024", getOneLineFileInfoField(f, "size"));
7  
  printInfos(f);
8  
  setOneLineFileInfoField(f, "md5", "abcd...");
9  
  assertEqualsVerbose("1024", getOneLineFileInfoField(f, "size"));
10  
  assertEqualsVerbose("abcd...", getOneLineFileInfoField(f, "md5"));
11  
  printInfos(f);
12  
  setOneLineFileInfoField(f, "size", null);
13  
  assertEqualsVerbose(null, getOneLineFileInfoField(f, "size"));
14  
  printInfos(f);
15  
}
16  
17  
svoid printInfos(File f) {
18  
  printIndent("INFOS | ", loadTextFile(associatedInfosFile(f)));
19  
  print();
20  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1018726
Snippet name: Test setOneLineFileInfoField + getOneLineFileInfoField (OK)
Eternal ID of this version: #1018726/3
Text MD5: c70976e8a4b832263f6abb67824f656d
Transpilation MD5: 65e69ef63c8c15f5f2a895b6201a761a
Author: stefan
Category: javax / io
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-12 00:44:10
Source code size: 628 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 319 / 853
Version history: 2 change(s)
Referenced in: [show references]