Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Analysis.AlgorithmBehavior/AlgorithmBehaviorUnitTests/UnitTest1.cs @ 9723

Last change on this file since 9723 was 9723, checked in by ascheibe, 11 years ago

#1886 worked on solution caching

File size: 899 bytes
Line 
1using HeuristicLab.Analysis.AlgorithmBehavior.Analyzers;
2using HeuristicLab.Encodings.PermutationEncoding;
3using Microsoft.VisualStudio.TestTools.UnitTesting;
4
5namespace 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.