Last change
on this file since 15463 was
15463,
checked in by rhanghof, 6 years ago
|
#2817
-Added unit tests for bin packing 3d.
-The items can now be sorted by the material.
|
File size:
792 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Reflection;
|
---|
5 | using System.Text;
|
---|
6 | using System.Threading.Tasks;
|
---|
7 |
|
---|
8 | namespace HeuristicLab.Problems.BinPacking._3D.Utils.Tests {
|
---|
9 | internal static class TestUtils {
|
---|
10 | public static object InvokeStaticMethod(Type type, string methodName, object[] parameters) {
|
---|
11 | var method = type.GetMethod(methodName, System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static);
|
---|
12 | return method.Invoke(null, parameters);
|
---|
13 | }
|
---|
14 |
|
---|
15 | public static object InvokeMethod(Type type, object o, string methodName, object[] parameters) {
|
---|
16 | var method = type.GetMethod(methodName, BindingFlags.NonPublic | BindingFlags.Instance);
|
---|
17 | return method.Invoke(o, parameters);
|
---|
18 | }
|
---|
19 | }
|
---|
20 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.