public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (TestClassName != null ? TestClassName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)Result;
         hashCode = (hashCode * 397) ^ (TestMethods != null ? TestMethods.GetHashCode() : 0);
         return(hashCode);
     }
 }
Example #2
0
 /// <summary>
 /// Initialize the rewriter instance by test type
 /// </summary>
 /// <param name="testType"></param>
 public TestSyntaxRewriter(TestClassName testType) : base()
 {
     this.testType = testType;
     this.helper   = new RewriterHelper(testType);
 }
Example #3
0
 public void ResetRandom(int x)
 {
     Random = new Random(x + TestClassName.GetHashCode());
 }
Example #4
0
 public TestClassNameAttribute(TestClassName _)
 {
 }
Example #5
0
 public RewriterHelper(TestClassName testType)
 {
     this.testType = testType;
 }
Example #6
0
 public static string GenerateTestName(string fileName, TestClassName testType)
 => Regex.Replace(fileName, @"(\.cs)$", $".{testType:G}.Generated$1");