public void Index2NormaizeMethodenTest() { Index2 i1 = new Index2(20, 20); // Startwert Index2 i2 = new Index2(12, 13); // 2D-Size Index3 i2b = new Index3(12, 13, 14); // 3D-Size Index2 i3 = new Index2(8, 20); // Ergebnis bei NormX Index2 i4 = new Index2(20, 7); // Ergebnis bei NormY Index2 i5 = new Index2(8, 7); // Ergebnis bei NormXY // Norm X (int) Index2 t = i1; t.NormalizeX(i2.X); Assert.Equals(i3, t); // Norm X (index2) t = i1; t.NormalizeX(i2); Assert.Equals(i3, t); // Norm X (index3) t = i1; t.NormalizeX(i2b); Assert.Equals(i3, t); // Norm Y (int) t = i1; t.NormalizeY(i2.Y); Assert.Equals(i4, t); // Norm Y (index2) t = i1; t.NormalizeY(i2); Assert.Equals(i4, t); // Norm Y (index3) t = i1; t.NormalizeY(i2b); Assert.Equals(i4, t); // Norm XY (int) t = i1; t.NormalizeXY(i2.X, i2.Y); Assert.Equals(i5, t); // Norm XY (index2) t = i1; t.NormalizeXY(i2); Assert.Equals(i5, t); // Norm XY (index3) t = i1; t.NormalizeXY(i2b); Assert.Equals(i5, t); }