public static GivenStatement NewApiKey(this GivenStatement givenStatement, TestUserApiKeyJsonEntity apiKey, string testKey = null) { givenStatement.GetStatementLogger() .Information($"[{{ContextStatement}}] Saving api keys {apiKey}", givenStatement.GetType().Name); givenStatement.AddData(apiKey, BddKeyConstants.NewApiKey + testKey); return(givenStatement); }
public static GivenStatement ApiKeyToRemove(this GivenStatement givenStatement, string apiKey, string testKey = null) { givenStatement.GetStatementLogger() .Information($"[{{ContextStatement}}] Saving api key description to remove {apiKey}", givenStatement.GetType().Name); givenStatement.AddData(apiKey, BddKeyConstants.ApiKeyToRemove + testKey); return(givenStatement); }
public override void Switch(IAstTransformer transformer, out Node resultingNode) { GivenStatement thisNode = (GivenStatement)this; Statement resultingTypedNode = thisNode; transformer.OnGivenStatement(thisNode, ref resultingTypedNode); resultingNode = resultingTypedNode; }
public static GivenStatement NewUserData(this GivenStatement givenStatement, TestUserModel userModel, string testKey = null) { givenStatement.GetStatementLogger() .Information($"[{{ContextStatement}}] Saving user model {userModel}", givenStatement.GetType().Name); givenStatement.AddData(userModel, testKey); return(givenStatement); }
public static GivenStatement NewTimeSeries(this GivenStatement givenStatement, TestTimeSeriesMetadataModel timeSeries, string testKey = null) { givenStatement.GetStatementLogger() .Information($"[{{ContextStatement}}] Saving time-series to create {timeSeries}", givenStatement.GetType().Name); givenStatement.AddData(timeSeries, BddKeyConstants.TimeSeriesToCreate + testKey); return(givenStatement); }
public static GivenStatement UserSession(this GivenStatement givenStatement, string session, string testKey = null) { givenStatement.GetStatementLogger() .Information($"[{{ContextStatement}}] Saving user session '{session}'", givenStatement.GetType().Name); givenStatement.AddData(session, BddKeyConstants.SessionTokenKey + testKey); return(givenStatement); }
public static GivenStatement UserLoginCredentials(this GivenStatement givenStatement, TestLoginModel loginCredentials, string testKey = null) { givenStatement.GetStatementLogger() .Information($"[{{ContextStatement}}] Saving user credentials {loginCredentials}", givenStatement.GetType().Name); givenStatement.AddData(loginCredentials, testKey); return(givenStatement); }
public static GivenStatement DefaultUserLoginCredentials(this GivenStatement givenStatement, string testKey = null) { var loginCredentials = new TestLoginModel { Email = _configuration.UserName, Password = _configuration.Password, }; return(givenStatement.UserLoginCredentials(loginCredentials, testKey)); }
public override void Accept(GivenStatement switchStmt) { foreach (AstNode node in switchStmt.WhenStatements.Children) { WhenStatement caseStmt = node as WhenStatement; caseStmt.Values.Visit(this); caseStmt.Body.Visit(this); } switchStmt.GivenValue.Visit(this); methodBuilder.EmitInstruction(switchStmt.Location, Opcode.SwitchLookup, switchStmt.WhenStatements.Children.Count); IodineLabel endLabel = methodBuilder.CreateLabel(); methodBuilder.EmitInstruction(switchStmt.Location, Opcode.JumpIfTrue, endLabel); switchStmt.DefaultStatement.Visit(this); methodBuilder.MarkLabelPosition(endLabel); }
override public void LeaveGivenStatement(GivenStatement node) { NotImplemented(node, "given"); }
public override void Accept(GivenStatement switchStmt) { errorLog.AddError(ErrorType.ParserError, switchStmt.Location, "statement can not exist inside pattern!"); }
public override void Accept(GivenStatement givenStmt) { givenStmt.VisitChildren(this); }
public override void Accept(GivenStatement switchStmt) { errorLog.AddError(ErrorType.ParserError, switchStmt.Location, "Statement not allowed outside function body!"); }
public virtual void Accept(GivenStatement switchStmt) { }