com.google.common.truth
Class StringSubject

java.lang.Object
  extended by com.google.common.truth.Subject<StringSubject,String>
      extended by com.google.common.truth.StringSubject

public class StringSubject
extends Subject<StringSubject,String>

Propositions for String subjects

Author:
David Saff, Christian Gruber ([email protected])

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.common.truth.Subject
Subject.HasField
 
Field Summary
static SubjectFactory<StringSubject,String> STRING
           
 
Fields inherited from class com.google.common.truth.Subject
failureStrategy
 
Constructor Summary
StringSubject(FailureStrategy failureStrategy, String string)
           
 
Method Summary
 void contains(String string)
           
 void doesNotContain(String string)
           
 void doesNotMatch(Pattern regex)
           
 void doesNotMatch(String regex)
           
 void endsWith(String string)
           
protected  String getDisplaySubject()
           
 void is(Object expected)
           
 void isEqualTo(Object expected)
           
 void isNull()
           
 void matches(Pattern regex)
           
 void matches(String regex)
           
 void startsWith(String string)
           
 
Methods inherited from class com.google.common.truth.Subject
check, equals, fail, failWithBadResults, failWithCustomSubject, failWithoutSubject, failWithRawMessage, getSubject, hasField, hashCode, internalCustomName, isA, isNotA, isNotEqualTo, isNotNull, labeled, named
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STRING

public static final SubjectFactory<StringSubject,String> STRING
Constructor Detail

StringSubject

public StringSubject(FailureStrategy failureStrategy,
                     String string)
Method Detail

getDisplaySubject

protected String getDisplaySubject()
Overrides:
getDisplaySubject in class Subject<StringSubject,String>

is

public void is(Object expected)
Overrides:
is in class Subject<StringSubject,String>

isEqualTo

public void isEqualTo(Object expected)
Overrides:
isEqualTo in class Subject<StringSubject,String>

isNull

public void isNull()
Overrides:
isNull in class Subject<StringSubject,String>

contains

public void contains(String string)

doesNotContain

public void doesNotContain(String string)

startsWith

public void startsWith(String string)

endsWith

public void endsWith(String string)

matches

@GwtIncompatible(value="java.util.regex.Pattern")
public void matches(String regex)

matches

@GwtIncompatible(value="java.util.regex.Pattern")
public void matches(Pattern regex)

doesNotMatch

@GwtIncompatible(value="java.util.regex.Pattern")
public void doesNotMatch(String regex)

doesNotMatch

@GwtIncompatible(value="java.util.regex.Pattern")
public void doesNotMatch(Pattern regex)


Copyright © 2014. All rights reserved.