public void PrintToString_WhenTakeOnlySerial() { _class = new ClassWithField { StrField = "String" }; _class.PrintToString(ser => ser.AlternativeFor <string>().TakeOnly(1)).Should().NotContain(_class.StrField) .And.Contain(_class.StrField[0].ToString()); }
public void PrintToString_WhenAlternativeCultureSerial(string culture, double height, string expectHeight) { var _class = new ClassWithField { DoublField = height }; var result = _class.PrintToString(ser => ser.AlternativeFor <double>().Using(new CultureInfo(culture))); result.Should().Contain(expectHeight); }
public void PrintToString_WhenTakeOnlySerialWithNullOrEmpty(string str) { _class = new ClassWithField { StrField = str }; var result = _class.PrintToString(ser => ser.AlternativeFor <string>().TakeOnly(1)); result.Should().Contain(nameof(_class.StrField)); }
public void PrintToString_WhenPersonWithArgument_ShouldContainValueAfterName() { _class = new ClassWithField { StrField = "Value" }; var result = _class.PrintToString(); IsValueAfterName(nameof(_class.StrField), _class.StrField, result).Should().BeTrue(); }
public void PrintToString_WhenField() { _class.PrintToString().Should().Contain(nameof(_class.IntField)).And.Contain(nameof(_class.DoublField)).And .Contain(nameof(_class.StrField)); }