Beispiel #1
0
        public void DefaultValueExpression()
        {
            IParserContext context = new FlexContext();

            context.Set("a", "");
            context.Set("b", "z");


            Assert.AreEqual("x", _parser.Evaluate <string>("a ?: \"x\"", context));
            Assert.AreEqual("z", _parser.Evaluate <string>("b ?: \"x\"", context));
        }
Beispiel #2
0
        public void TestEscapes_Xml()
        {
            IParserContext vars = new FlexContext();

            string input = "$X";

            vars.Set("X", "A>B");

            string s = xmlParser.Render(input, vars);

            Assert.AreEqual("A&gt;B", s);
        }
Beispiel #3
0
        public void TestDSDFSDFSDF()
        {
            IParserContext vars = new FlexContext();

            List <string> items = new List <string>();

            items.Add("A");
            items.Add("B");

            vars.Set("Items", items);

            string input = @"#foreach (item in Items)${item}#end#foreach (item in Items)${item}#end";

            string s = velocityParser.Render(input, vars);

            Assert.AreEqual("ABAB", s);
        }
 public CreateTrainingPlan(IUserContext userContext, FlexContext dbContext)
 {
     this.dbContext   = dbContext;
     this.userContext = userContext;
 }
Beispiel #5
0
 public StartTrainingPlan(FlexContext dbContext)
 {
     this.dbContext = dbContext;
 }
Beispiel #6
0
 public GetTrainingPlanExercises(IUserContext userContext, FlexContext dbContext)
 {
     this.dbContext   = dbContext;
     this.userContext = userContext;
 }
 public GetExercises(FlexContext dbContext)
 {
     this.dbContext = dbContext;
 }
Beispiel #8
0
 public CreateExercise(FlexContext dbContext)
 {
     this.dbContext = dbContext;
 }
Beispiel #9
0
 public DeleteTrainingPlan(FlexContext dbContext)
 {
     this.dbContext = dbContext;
 }
 public RemoveExerciseFromTrainingPlan(FlexContext dbContext)
 {
     this.dbContext = dbContext;
 }
Beispiel #11
0
 public CreateUser(FlexContext dbContext)
 {
     this.dbContext = dbContext;
 }
 public UserContext(IHttpContextAccessor httpContextAccessor, FlexContext context, IMediator mediator)
 {
     this.httpContextAccessor = httpContextAccessor;
     this.context             = context;
     this.mediator            = mediator;
 }
Beispiel #13
0
 public DeleteExercise(FlexContext dbContext)
 {
     this.dbContext = dbContext;
 }
Beispiel #14
0
 public AddExerciseToTrainingPlan(IUserContext userContext, FlexContext dbContext)
 {
     this.dbContext   = dbContext;
     this.userContext = userContext;
 }