public void Given_StringBuilder_when_NullifyStringBuilder_Then_ValueShouldBeChange() { char[] strAlphabet = { 'A', 'B', 'C' }; string str = new string(strAlphabet); string strpassing = str; var cSharpTypes = new cSharpTypes(); cSharpTypes.ChangeValueOfString(strpassing); Assert.That(strpassing, Is.EqualTo(str)); }
public void Given_StringBuilder_when_ChangeValueOfStringBuilder_Then_ValueShouldBeChange() { var stringBuilder = new StringBuilder(); stringBuilder.Append(myStringValue); var cSharpTypes = new cSharpTypes(); cSharpTypes.ChangeValueOfStringBuilder(stringBuilder); Assert.That(myStringValue, Is.Not.EqualTo(stringBuilder)); }
public void Given_Outstruct_when_ChangeValueOut_Then_ValueShouldBeChange() { var cSharpTypes = new cSharpTypes(); cSharpTypes.ChangeValueOut(out someStruct); Assert.That(someStruct.DecimalNumber, Is.Not.EqualTo(myDecimalNumber)); Assert.That(someStruct.DoubleNumber, Is.Not.EqualTo(myDoubleNumber)); Assert.That(someStruct.Number, Is.Not.EqualTo(myNumber)); Assert.That(someStruct.StringValue, Is.Not.EqualTo(myStringValue)); }
public void Given_Refstruct_when_ChangeValue_Then_ValueShouldNotBeChange() { var cSharpTypes = new cSharpTypes(); InitialiseStruct(); cSharpTypes.ChangeValue(ref someStruct); Assert.That(someStruct.DecimalNumber, Is.Not.EqualTo(myDecimalNumber)); Assert.That(someStruct.DoubleNumber, Is.Not.EqualTo(myDoubleNumber)); Assert.That(someStruct.Number, Is.Not.EqualTo(myNumber)); Assert.That(someStruct.StringValue, Is.Not.EqualTo(myStringValue)); }
public void Given_dto_when_ChangeValue_Then_ValueShouldBeChange() { var cSharpTypes = new cSharpTypes(); InitialiseDto(); cSharpTypes.ChangeValue(myDto); Assert.That(myDto.DecimalNumber, Is.Not.EqualTo(myDecimalNumber)); Assert.That(myDto.DoubleNumber, Is.Not.EqualTo(myDoubleNumber)); Assert.That(myDto.Number, Is.Not.EqualTo(myNumber)); Assert.That(myDto.PropertyNumber, Is.Not.EqualTo(myPropertyNumber)); Assert.That(myDto.PropertyString, Is.Not.EqualTo(myPropertystring)); Assert.That(myDto.StringValue, Is.Not.EqualTo(myStringValue)); }
public void Given_struct_when_ChangeValue_Then_ValueShouldNotBeChange() { var cSharpTypes = new cSharpTypes(); InitialiseStruct(); cSharpTypes.ChangeValue(someStruct); Assert.That(someStruct.DecimalNumber, Is.EqualTo(myDecimalNumber)); Assert.That(someStruct.DoubleNumber, Is.EqualTo(myDoubleNumber)); Assert.That(someStruct.Number, Is.EqualTo(myNumber)); Assert.That(someStruct.StringValue, Is.EqualTo(myStringValue)); }
public void Given_StringBuilder_when_NullifyStringBuilder_Then_ValueShouldBeChange() { char[] strAlphabet={'A','B','C'}; string str = new string(strAlphabet); string strpassing = str; var cSharpTypes = new cSharpTypes(); cSharpTypes.ChangeValueOfString(strpassing); Assert.That(strpassing, Is.EqualTo(str)); }
public void Given_StringBuilder_when_ChangeValueOfStringBuilder_Then_ValueShouldBeChange() { var stringBuilder=new StringBuilder(); stringBuilder.Append(myStringValue); var cSharpTypes=new cSharpTypes(); cSharpTypes.ChangeValueOfStringBuilder(stringBuilder); Assert.That(myStringValue, Is.Not.EqualTo(stringBuilder)); }
public void Given_dto_when_ChangeValue_Then_ValueShouldBeChange() { var cSharpTypes = new cSharpTypes(); InitialiseDto(); cSharpTypes.ChangeValue(myDto); Assert.That(myDto.DecimalNumber,Is.Not.EqualTo(myDecimalNumber)); Assert.That(myDto.DoubleNumber,Is.Not.EqualTo(myDoubleNumber)); Assert.That(myDto.Number,Is.Not.EqualTo(myNumber)); Assert.That(myDto.PropertyNumber,Is.Not.EqualTo(myPropertyNumber)); Assert.That(myDto.PropertyString,Is.Not.EqualTo(myPropertystring)); Assert.That(myDto.StringValue,Is.Not.EqualTo(myStringValue)); }