From 78570a59ec6e87da211dad1ffd2dedc235f984be Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Sun, 19 May 2024 00:55:46 +0200 Subject: [PATCH] LDEV-4859 test case for create object (6.1) --- test/tickets/LDEV4859.cfc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/tickets/LDEV4859.cfc diff --git a/test/tickets/LDEV4859.cfc b/test/tickets/LDEV4859.cfc new file mode 100644 index 0000000000..6bdd62d024 --- /dev/null +++ b/test/tickets/LDEV4859.cfc @@ -0,0 +1,17 @@ +component extends="org.lucee.cfml.test.LuceeTestCase" labels="java" { + + function run( testResults , testBox ) { + describe( title='LDEV-4859' , body=function(){ + it( title='test createObject' , body=function() { + expect(function(){ + var nioPath = createObject("java", "java.nio.file.Paths").get( getTempFile( getTempDirectory(), "ldev4859" ), [] ); + var nioAttributes = createObject("java", "java.nio.file.attribute.BasicFileAttributes"); + var nioFiles = createObject("java", "java.nio.file.Files"); + var fileAttr = nioFiles.readAttributes(nioPath, nioAttributes.getClass(), []); + var created = fileAttr.creationTime().toString(); + }).notToThrow(); + }); + }); + } + +} \ No newline at end of file