Пример #1
0
        /// <summary>
        /// The handle home made.
        /// </summary>
        /// <param name="addCarrier">
        /// The add carrier.
        /// </param>
        /// <param name="testdata">
        /// The testdata.
        /// </param>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        private bool HandleHomeMade(IWowenWrap addCarrier, WovenTestData testdata)
        {
            if (string.IsNullOrEmpty(testdata.HomeMade))
            {
                addCarrier.HomeMade = false;

                return(true);
            }

            addCarrier.HomeMade = true;
            addCarrier.Name     = $"MyOwn_{Guid.NewGuid()}";

            return(true);
        }
Пример #2
0
        /// <summary>
        /// The brand pattern model.
        /// </summary>
        /// <param name="addCarrier">
        /// The add carrier.
        /// </param>
        /// <param name="testdata">
        /// The testdata.
        /// </param>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        private bool HandleBrandPatternModel(IWowenWrap addCarrier, WovenTestData testdata)
        {
            if (!string.IsNullOrEmpty(testdata.Brand))
            {
                addCarrier.Brand = testdata.Brand;
            }

            addCarrier.Pattern = string.IsNullOrEmpty(testdata.Pattern)
                               ? "--- without pattern ---"
                               : testdata.Pattern;

            if (!string.IsNullOrEmpty(testdata.Model))
            {
                addCarrier.Model = testdata.Model;
            }

            return(true);
        }
Пример #3
0
        /// <summary>
        /// The handle size grade acquired.
        /// </summary>
        /// <param name="addCarrier">
        /// The add carrier.
        /// </param>
        /// <param name="testdata">
        /// The testdata.
        /// </param>
        /// <returns>
        /// The <see cref="bool"/>.
        /// </returns>
        private bool HandleSizeGradeAcquired(IWowenWrap addCarrier, WovenTestData testdata)
        {
            addCarrier.Size  = testdata.Size;
            addCarrier.Grade = testdata.Grade;

            int daysOffSet;

            if (!int.TryParse(testdata.Acquired, out daysOffSet))
            {
                daysOffSet = 0;
            }

            var acquired = DateTime.Now.AddDays(daysOffSet);

            addCarrier.Acquired = acquired;

            return(true);
        }