public void ToConcatString_ReturnsWithFixedLayoutLeftAndRightWhiteSpaces() { var _prd = new DTO.WithWhiteSpaces.ProductLeftAndRightWhiteSpacesDTO(); _prd.Name = "Name of Product"; _prd.Price = 13.5M; _prd.IdCategory = 51; _prd.CategoryDescription = "Category Description"; var _actual = _prd.ToConcatString(); var _expectedValue = " Name of Product13,5 51Category Description "; Assert.Equal(_expectedValue, _actual); }
public void ToLoadThisObject_CreateObjBasedStringFixedLayoutLeftAndRightWhiteSpaces() { bool _expectedValue = true; var _actual = new DTO.WithWhiteSpaces.ProductLeftAndRightWhiteSpacesDTO(); string _concatedValue = " Name of Product13,5 51Category Description "; _actual.ToLoadThisObject(_concatedValue); _expectedValue = (_actual.Name == "Name of Product") && (_actual.Price == 13.5M) && (_actual.IdCategory == 51) && (_actual.CategoryDescription == "Category Description"); Assert.True(_expectedValue); }