예제 #1
0
        public void ToConcatString_ReturnsWithFixedLayoutLeftWhiteSpacesWithDelimiter()
        {
            var _prd = new DTO.WithWhiteSpaces.WithDelimiter.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);
        }
예제 #2
0
        public void ToLoadThisObject_CreateObjBasedStringFixedLayoutLeftWhiteSpacesWithDelimiter()
        {
            bool   _expectedValue = true;
            var    _actual        = new DTO.WithWhiteSpaces.WithDelimiter.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);
        }