public Comment GetById(int id) { return(new Comment { Id = id, Description = "Something Something by id", SurveyId = MockRandom.Random().Next(100), UserId = new int().ToString() }); }
public ICollection <Customer> GetAll() { return(new List <Customer> { GetById(MockRandom.Random().Next(100)), GetById(MockRandom.Random().Next(100)), GetById(MockRandom.Random().Next(100)), GetById(MockRandom.Random().Next(100)) }); }
ICollection <Comment> ICommentService.GetByUserId(string id) { return(new List <Comment> { new Comment { Id = MockRandom.Random().Next(100), Description = "Something Something by user", SurveyId = new int(), UserId = id } }); }
public ICollection <Comment> GetBySurveyId(int id) { return(new List <Comment> { new Comment { Id = MockRandom.Random().Next(100), Description = "Something Something by survey", SurveyId = id, UserId = new int().ToString() } }); }
public SectionGroup GetById(int id) { return(new SectionGroup { Id = id, IsMandatory = MockRandom.Random().NextDouble() > 0.5, SurveyTemplateId = MockRandom.Random().Next(100), SortOrder = MockRandom.Random().Next(100), Title = "Section Group Mock" + id, Section = new List <Section>() { new SectionServiceMock().GetById(MockRandom.Random().Next(100)), new SectionServiceMock().GetById(MockRandom.Random().Next(100)) }.OrderBy(m => m.SortOrder).ToList() }); }
public Section GetById(int id) { return(new Section { Id = id, Title = "Mock Section" + id, Description = "Mock Description of section", SectionGroupId = MockRandom.Random().Next(100), SortOrder = MockRandom.Random().Next(100), Question = new List <Question> { new QuestionServiceMock().GetById(MockRandom.Random().Next(100)), new QuestionServiceMock().GetById(MockRandom.Random().Next(100)), new QuestionServiceMock().GetById(MockRandom.Random().Next(100)) } }); }
public Survey GetById(int id) { var currentState = new SurveyState { Id = 1, Name = "Created" }; var currentCustomer = new Customer { Id = MockRandom.Random().Next(100), Name = "Customer 1" }; return(new Survey { Id = id, SurveyTemplateId = MockRandom.Random().Next(100), SurveyState = currentState, Customer = currentCustomer, UserId = MockRandom.Random().Next(100).ToString() }); }
public SurveyTemplate GetById(int id) { return(new SurveyTemplate { CreatedBy = "Mock", TaskDetails = "Some kind of description", Title = "Base Survey Template", Id = id, Description = "Another kind of description", OwnerId = new OwnerServiceMock().GetById(MockRandom.Random().Next(100)).Id, SurveyTypeId = new SurveyTypeServiceMock().GetById(1).Id, SectionGroup = new List <SectionGroup>() { new SectionGroupServiceMock().GetById(MockRandom.Random().Next(100)), new SectionGroupServiceMock().GetById(MockRandom.Random().Next(100)), new SectionGroupServiceMock().GetById(MockRandom.Random().Next(100)) }.OrderBy(m => m.SortOrder).ToList() }); }
public Question GetById(int id) { var questionType = MockRandom.Random().Next(3); var optionGroup = new OptionGroupServiceMock().GetById(questionType); return(new Question { Id = id, IsMandatory = MockRandom.Random().NextDouble() > 0.5, AnswerLabel = "Answer Me!!", DefaultComments = "Should this be updated after the answer?", HelpText = "This is the easiest question ever", QuestionText = "How much is " + MockRandom.Random().Next(10) + " + " + MockRandom.Random().Next(10), SectionId = MockRandom.Random().Next(100), AnswerValidationExpression = "42 the answer of everything", OptionGroupId = new OptionGroupServiceMock().GetById(MockRandom.Random().Next(3)).Id, OptionGroup = optionGroup, QuestionTypeId = questionType }); }
public List <Survey> GetByUserId(string userId) { var result = new List <Survey>(); var currentState = new SurveyState { Id = 1, Name = "Created" }; var currentCustomer = new Customer { Id = MockRandom.Random().Next(100), Name = "Customer 1" }; result.Add(new Survey { Id = MockRandom.Random().Next(100), SurveyTemplateId = MockRandom.Random().Next(100), SurveyState = currentState, Customer = currentCustomer, UserId = userId }); result.Add(new Survey { Id = MockRandom.Random().Next(100), SurveyTemplateId = MockRandom.Random().Next(100), SurveyState = currentState, Customer = currentCustomer, UserId = userId }); result.Add(new Survey { Id = MockRandom.Random().Next(100), SurveyTemplateId = MockRandom.Random().Next(100), SurveyState = currentState, Customer = currentCustomer, UserId = userId }); return(result); }
public ICollection <AnswerGroup> GetBySurveyId(int id) { return(new List <AnswerGroup> { new AnswerGroup { Id = MockRandom.Random().Next(100), SurveyId = id, SectionGroupId = MockRandom.Random().Next(100) } }); }
public AnswerGroup GetBySectionGroupId(int id) { return(new AnswerGroup { Id = MockRandom.Random().Next(100), SurveyId = new int(), SectionGroupId = id }); }
private string RandomEnumValue <T>() { var v = Enum.GetValues(typeof(T)); return((string)v.GetValue(MockRandom.Random().Next(v.Length))); }
public Owner GetOwnerForSurveyId(int id) { return(GetById(MockRandom.Random().Next(100))); }
public Customer GetById(int id) { return(new Customer { Id = MockRandom.Random().Next(100), Name = "CustomerName" + id, Telephone = "91 91 91 91" }); }