Line | |
---|
1 | using HeuristicLab.Analysis.AlgorithmBehavior.Analyzers;
|
---|
2 | using HeuristicLab.Encodings.PermutationEncoding;
|
---|
3 | using Microsoft.VisualStudio.TestTools.UnitTesting;
|
---|
4 |
|
---|
5 | namespace AlgorithmBehaviorUnitTests {
|
---|
6 | [TestClass]
|
---|
7 | public class UnitTest1 {
|
---|
8 | [TestMethod]
|
---|
9 | public void TestPermutationWrapper() {
|
---|
10 | var rand = new HeuristicLab.Random.FastRandom();
|
---|
11 | var permutation1 = new Permutation(PermutationTypes.RelativeUndirected, 3000, rand);
|
---|
12 | var permutation2 = new Permutation(PermutationTypes.RelativeUndirected, 3000, rand);
|
---|
13 |
|
---|
14 | PermutationWrapper wrapper = new PermutationWrapper();
|
---|
15 | wrapper.StorePartialPermutation(permutation1, permutation2);
|
---|
16 |
|
---|
17 | var newPermutation2 = wrapper.GetPermutation();
|
---|
18 | PermutationEqualityComparer comp = new PermutationEqualityComparer();
|
---|
19 | Assert.IsTrue(comp.Equals(permutation2, newPermutation2));
|
---|
20 | }
|
---|
21 | }
|
---|
22 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.