public void ToConcatString_ReturnsWithFixedLayoutLeftWhiteSpaces() { var _prd = new DTO.WithWhiteSpaces.ProductLeftWhiteSpacesDTO(); _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_CreateObjBasedStringFixedLayoutLeftWhiteSpaces() { bool _expectedValue = true; var _actual = new DTO.WithWhiteSpaces.ProductLeftWhiteSpacesDTO(); 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); }