Exemple #1
0
        public static object GetMock()
        {
            object mockContainer = Substitute.For(new[] { typeof(IFlowRepository), typeof(IFunctionScriptRepository) }, null);

            ((IFlowRepository)mockContainer).AddAsync(Arg.Any <Flow>()).Returns(true);
            ((IFunctionScriptRepository)mockContainer).AddAsync(Arg.Any <FunctionScript>()).Returns(true);
            ((IFunctionScriptRepository)mockContainer).GetAsync(Arg.Any <Expression <Func <FunctionScript, bool> > >(), Arg.Any <bool>(), Arg.Any <Expression <Func <FunctionScript, object> >[]>()).Returns(StaticFunctionScript.GetFunctionScriptSucess());

            return(mockContainer);
        }
Exemple #2
0
 public static Process GetInsctructionSucess()
 {
     return(new Process {
         Id = Guid.Parse("320e930a-0eeb-4fa7-942d-501c25258ef9"), Active = true, FunctionScript = StaticFunctionScript.GetFunctionScriptSucess(), Paramters = ParameterStatic.GetListParameterSucess()
     });
 }