Пример #1
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);
        }
        public void TestBasicBrandNumberOf()
        {
            var brandNumberOfPatterns = wtApi.BrandNumberOfPatterns("34");
            var brandNumberOfModels   = wtApi.BrandNumberOfModels("34");

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