コード例 #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);
        }
コード例 #2
0
        public void Tc016()
        {
            // 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 newModelName           = WtUtils.GetRandomString("StfModel");
            var baseLineNumberOfModels = wtApi.BrandNumberOfModels(BrandId);
            var modelAdded             = randomBrand.AddModel(newModelName);
            var numberOfModels         = wtApi.BrandNumberOfModels(BrandId);

            StfAssert.IsTrue($"Model {newModelName} Added", modelAdded);
            StfAssert.AreEqual("Number of models for brand up by one", numberOfModels, baseLineNumberOfModels + 1);

            var patternDeleted = randomBrand.DeleteModel(newModelName);

            numberOfModels = wtApi.BrandNumberOfModels(BrandId);
            StfAssert.IsTrue($"Model {newModelName} Deleted", patternDeleted);
            StfAssert.AreEqual($"Number of models for brand as baseline", numberOfModels, baseLineNumberOfModels);
        }
コード例 #3
0
        /// <summary>
        /// Test of creating a new brand.
        /// </summary>
        // Uncommented as AddBrand is unsupported[TestMethod]
        public void Tc014()
        {
            StfAssert.IsNotNull("wrapTrackShell", wrapTrackShell);

            var explorer = wrapTrackShell.Explore();

            StfAssert.IsInstanceOfType("explorer", explorer, typeof(IExplore));

            var brands   = explorer.Brands();
            var addBrand = brands.AddBrand();

            StfAssert.IsNotNull("Add brand", addBrand);

            var newBrandName = WtUtils.GetRandomString("StfBrand");

            addBrand.NewBrandName = newBrandName;
            addBrand.Save();
        }