public void ToConcatString_ReturnsWithFixedLayoutRightWhiteSpacesWithDelimiterMaxLenght() { var _prd = new DTO.WithWhiteSpaces.WithDelimiter.ProductRightWhiteSpacesDTO(); _prd.Name = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUFIM THIS PART SHOULD NOT BE CONSIDERED"; _prd.Price = 1234567.89M; _prd.IdCategory = 1234567890; _prd.CategoryDescription = "ABCDEFGHIJKLMNOPRSTUVWFIM THIS PART SHOULD NOT BE CONSIDERED"; var _actual = _prd.ToConcatString(); var _expectedValue = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUFIM-->1234567,89-->12345-->ABCDEFGHIJKLMNOPRSTUVWFIM-->"; Assert.Equal(_expectedValue, _actual); }
public void ToConcatString_ReturnsWithFixedLayoutRightWhiteSpacesWithDelimiter() { var _prd = new DTO.WithWhiteSpaces.WithDelimiter.ProductRightWhiteSpacesDTO(); _prd.Name = "Name of Product"; _prd.Price = 13.5M; _prd.IdCategory = 51; _prd.CategoryDescription = "Category Description"; var _actual = _prd.ToConcatString(); var _expectedValue = "Name of Product -->13,5 -->51 -->Category Description -->"; Assert.Equal(_expectedValue, _actual); }
public void ToLoadThisObject_CreateObjBasedStringFixedLayoutRightWhiteSpacesWithDelimiterMaxLenght() { bool _expectedValue = true; var _actual = new DTO.WithWhiteSpaces.WithDelimiter.ProductRightWhiteSpacesDTO(); string _concatedValue = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUFIM-->1234567,89-->12345-->ABCDEFGHIJKLMNOPRSTUVWFIM-->"; _actual.ToLoadThisObject(_concatedValue); _expectedValue = (_actual.Name == "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUFIM") && (_actual.Price == 1234567.89M) && (_actual.IdCategory == 12345) && (_actual.CategoryDescription == "ABCDEFGHIJKLMNOPRSTUVWFIM"); Assert.True(_expectedValue); }
public void ToLoadThisObject_CreateObjBasedStringFixedLayoutRightWhiteSpacesWithDelimiter() { bool _expectedValue = true; var _actual = new DTO.WithWhiteSpaces.WithDelimiter.ProductRightWhiteSpacesDTO(); string _concatedValue = "Name of Product -->13,5 -->51 -->Category Description -->"; _actual.ToLoadThisObject(_concatedValue); _expectedValue = (_actual.Name == "Name of Product") && (_actual.Price == 13.5M) && (_actual.IdCategory == 51) && (_actual.CategoryDescription == "Category Description"); Assert.True(_expectedValue); }