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);
     }
 }
Beispiel #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);
 }
Beispiel #3
0
 public void ResetRandom(int x)
 {
     Random = new Random(x + TestClassName.GetHashCode());
 }
Beispiel #4
0
 public TestClassNameAttribute(TestClassName _)
 {
 }
Beispiel #5
0
 public RewriterHelper(TestClassName testType)
 {
     this.testType = testType;
 }
Beispiel #6
0
 public static string GenerateTestName(string fileName, TestClassName testType)
 => Regex.Replace(fileName, @"(\.cs)$", $".{testType:G}.Generated$1");