public void NotLikeString() { string s = "Testing"; string regEx = @""; StringAssert.NotLike(s, regEx); }
public void ReferenceShouldNotWriteCast() { MockSubReferenceObject msr = new MockSubReferenceObject(); msr.Reference = msr; Serializer s = new Serializer(); s.Settings.ReferenceWritingType = ReferenceOption.WriteIdentifier; s.Settings.IsCompact = true; string result = s.Serialize(msr); StringAssert.NotLike(result, "MockSubReferenceObject"); }
public void WhenSameString_ShouldNotBeReference() { string refString = "foo"; ArrayList al = new ArrayList(); al.Add(refString); al.Add(refString); Serializer s = new Serializer(); s.Settings.ReferenceWritingType = ReferenceOption.WriteIdentifier; string result = s.Serialize(al); StringAssert.NotLike(result, "this"); StringAssert.NotLike(result, @"\$"); }
public void TypeConverterControlsHowReferencesWritten() { Type intType = typeof(int); ArrayList list = new ArrayList(); list.Add(intType); list.Add(intType); Serializer s = new Serializer(); s.Settings.ReferenceWritingType = ReferenceOption.WriteIdentifier; s.Settings.Types.RegisterTypeConverter <Type>(new TypeToStringConverter()); string result = s.Serialize(list); StringAssert.NotLike(result, @"\$"); StringAssert.NotLike(result, "this"); }
public void It_should_not_generate_the_ICS_header() { StringAssert.NotLike(Calendar.ToString(), "%BEGIN:VCALENDAR%"); }