Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }