コード例 #1
0
ファイル: FindIndexTests.cs プロジェクト: novovandrey/EPAM
        public void Null_FindIndexTest()
        {
            // arrange
            int[] array = null;

            // act
            // assert
            Assert.ThrowsException <NullReferenceException>(() => FindIndex.Exec(array));
        }
コード例 #2
0
ファイル: FindIndexTests.cs プロジェクト: novovandrey/EPAM
        public void NullDim_FindIndexTest()
        {
            // arrange
            int[] array    = {};
            int   expected = -1;

            // act
            int result = FindIndex.Exec(array);

            // assert
            Assert.AreEqual(expected, result);
        }
コード例 #3
0
ファイル: FindIndexTests.cs プロジェクト: novovandrey/EPAM
        public void NegativeValue_FindIndexTest()
        {
            // arrange
            int[] array    = { -2, 8, -7, 4, 8, -9 };
            Int16 expected = 3;

            // act
            int result = FindIndex.Exec(array);

            // assert
            Assert.AreEqual(expected, result);
        }
コード例 #4
0
ファイル: FindIndexTests.cs プロジェクト: novovandrey/EPAM
        public void Normal_FindIndexTest()
        {
            // arrange
            int[] array    = { 2, 8, 7, 4, 9, 8 };
            Int16 expected = 3;

            // act
            int result = FindIndex.Exec(array);

            // assert
            Assert.AreEqual(expected, result);
        }
コード例 #5
0
ファイル: ZoneData.cs プロジェクト: whampson/gta-save-data
        public bool Equals(ZoneData other)
        {
            if (other == null)
            {
                return(false);
            }

            return(CurrentZoneIndex.Equals(other.CurrentZoneIndex) &&
                   CurrentLevel.Equals(other.CurrentLevel) &&
                   FindIndex.Equals(other.FindIndex) &&
                   Zones.SequenceEqual(other.Zones) &&
                   ZoneInfo.SequenceEqual(other.ZoneInfo) &&
                   NumberOfZones.Equals(other.NumberOfZones) &&
                   NumberOfZoneInfos.Equals(other.NumberOfZoneInfos) &&
                   MapZones.SequenceEqual(other.MapZones) &&
                   AudioZones.SequenceEqual(other.AudioZones) &&
                   NumberOfMapZones.Equals(other.NumberOfMapZones) &&
                   NumberOfAudioZones.Equals(other.NumberOfAudioZones));
        }
コード例 #6
0
 /// <summary>
 /// Get a list of indexes for where the child string occurs
 /// </summary>
 /// <returns></returns>
 private IEnumerable <int> IndexesOfUri() => FindIndex.FindAllIndexesOfSubstring(ResponseFromServer, ChildString + Uri);