/// <summary> /// The create user and find nati baby mulu model. /// </summary> /// <returns> /// The <see cref="IModel"/>. /// </returns> private IModel CreateUserAndFindNatiBabyMuluModel() { StfAssert.IsNotNull("wrapTrackShell", WrapTrackShell); var signUpResult = WrapTrackShell.SignUpAndLogin(); StfAssert.IsTrue("Sign up and login as test user", signUpResult); var natiBabyMuluModel = WrapTrackShell.GetToModel("2624"); StfAssert.IsNotNull("Nati Baby Mulu model", natiBabyMuluModel); return(natiBabyMuluModel); }
public void Tc020() { const string PictureToUpload = @"C:\temp\Stf\Images\WT.jpg"; // Set up user context for actual test // Use default user WrapTrackShell.Login(); var me = WrapTrackShell.Me(); StfAssert.IsNotNull("WrapTrackShell", WrapTrackShell); StfAssert.IsInstanceOfType("me", me, typeof(IMeProfile)); var modelId = GetRandomModelId(); var wtApi = Get <IWtApi>(); var modelInfoBefore = wtApi.ModelInfoByModelId(modelId); var oldNumberOfModelImages = modelInfoBefore.NumOfImages; // TODO: Check also for Empty String e.g. // StfAssert.IsEmptyString("modelId", modelId) StfAssert.IsNotNull("modelId", modelId); var modelToGet = WrapTrackShell.GetToModel(modelId); StfAssert.IsNotNull("modelToGet", modelToGet); var uploadPicture = modelToGet.UploadPicture(PictureToUpload); StfAssert.IsNotNull($"Able to upload picture [{PictureToUpload}]", uploadPicture); var modelInfoAfter = wtApi.ModelInfoByModelId(modelId); var newNmberOfModelImages = modelInfoAfter.NumOfImages; StfAssert.AreEqual( "Check if number of model images has increased", oldNumberOfModelImages + 1, newNmberOfModelImages); }