Пример #1
0
        public void Tc015()
        {
            // For now hard coded. TOdo: Random
            const string BrandId   = "289";
            const string BrandName = "Agossie";

            // Use default user
            WrapTrackShell.Login();
            StfAssert.IsNotNull("wrapTrackShell", WrapTrackShell);

            var randomBrand              = this.GetBrand(BrandName);
            var newPatternName           = WtUtils.GetRandomString("StfPattern");
            var baseLineNumberOfPatterns = wtApi.BrandNumberOfPatterns(BrandId);
            var patternAdded             = randomBrand.AddPattern(newPatternName);
            var numberOfPatterns         = wtApi.BrandNumberOfPatterns(BrandId);

            StfAssert.IsTrue($"Pattern {newPatternName} Added", patternAdded);
            StfAssert.GreaterThan("Number of patterns for brand up by one", numberOfPatterns, baseLineNumberOfPatterns);

            var patternDeleted = randomBrand.DeletePattern(newPatternName);

            StfAssert.IsTrue($"Pattern {newPatternName} Deleted", patternDeleted);
            numberOfPatterns = wtApi.BrandNumberOfPatterns(BrandId);
            StfAssert.AreEqual($"Number of patterns for brand as baseline", numberOfPatterns, baseLineNumberOfPatterns);
        }
        public void TestBasicBrandNumberOf()
        {
            var brandNumberOfPatterns = wtApi.BrandNumberOfPatterns("34");
            var brandNumberOfModels   = wtApi.BrandNumberOfModels("34");

            StfAssert.AreEqual("brandNumberOfPatterns", 3, brandNumberOfPatterns);
            StfAssert.AreEqual("brandNumberOfModels", 33, brandNumberOfModels);
        }