mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-05-19 09:27:07 +00:00
test[storage]: record class test
This commit is contained in:
+13
-1
@@ -1,4 +1,16 @@
|
||||
package com.zfoo.storage.util.lambda;
|
||||
/*
|
||||
* Copyright (C) 2020 The zfoo Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
|
||||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package com.zfoo.storage.util;
|
||||
|
||||
import com.zfoo.protocol.util.FieldUtils;
|
||||
import org.junit.Test;
|
||||
+14
-2
@@ -1,8 +1,20 @@
|
||||
package com.zfoo.storage.util.lambda;
|
||||
/*
|
||||
* Copyright (C) 2020 The zfoo Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
|
||||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package com.zfoo.storage.util;
|
||||
|
||||
import com.zfoo.storage.resource.TeacherResource;
|
||||
import com.zfoo.storage.util.LambdaUtils;
|
||||
import com.zfoo.storage.util.function.Func1;
|
||||
import com.zfoo.storage.util.lambda.LambdaMeta;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (C) 2020 The zfoo Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
||||
* in compliance with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
|
||||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package com.zfoo.storage.util;
|
||||
|
||||
import com.zfoo.storage.resource.StudentResource;
|
||||
import com.zfoo.storage.util.function.Func1;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* @author veione
|
||||
*/
|
||||
public class TestLambdaFunctionCache {
|
||||
|
||||
@Test
|
||||
public void testFunctionCache() {
|
||||
Func1<StudentResource, Object> nameFunc = StudentResource::getName;
|
||||
System.out.println(LambdaUtils.getMethodName(nameFunc));
|
||||
System.out.println(LambdaUtils.getMethodName(nameFunc));
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.zfoo.storage.util.lambda;
|
||||
|
||||
import com.zfoo.storage.resource.StudentResource;
|
||||
import com.zfoo.storage.util.LambdaUtils;
|
||||
import com.zfoo.storage.util.function.Func1;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* @author veione
|
||||
*/
|
||||
public class TestLambdaFunctionCache {
|
||||
|
||||
@Test
|
||||
public void testFunctionCache() {
|
||||
Func1<StudentResource, Object> nameFunc = StudentResource::getName;
|
||||
System.out.println(LambdaUtils.getMethodName(nameFunc));
|
||||
System.out.println(LambdaUtils.getMethodName(nameFunc));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user