Exemple #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldSplit()
        internal virtual void ShouldSplit()
        {
            CharValue charValue = charValue('a');

            assertThat(charValue.Split("a"), equalTo(list(EMPTY_STRING, EMPTY_STRING)));
            assertThat(charValue.Split("A"), equalTo(list(charValue)));
        }
Exemple #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldReverse()
        internal virtual void ShouldReverse()
        {
            foreach (char c in _chars)
            {
                CharValue charValue = charValue(c);
                assertThat(charValue.Reverse(), equalTo(charValue));
            }
        }
Exemple #3
0
 public override long UpdateHash(HashFunction hashFunction, long hash)
 {
     hash = hashFunction.Update(hash, _value.Length);
     foreach (char c in _value)
     {
         hash = CharValue.UpdateHash(hashFunction, hash, c);
     }
     return(hash);
 }