示例#1
0
        public void Setup()
        {
            _greetingService = new GreetingService();
            _dbRepository    = SetupDBRepository();
            _greetings       = new List <IGreeting>();
            HelloGreeting Hey = new HelloGreeting
            {
                Id     = 0,
                Name   = "Hello World",
                IsNice = true
            };

            _greetings.Add(Hey);
        }
示例#2
0
        public void Setup()
        {
            _greetingService = new GreetingService();
            _dbRepository    = SetupDBRepository();
            _greetings       = new List <IGreeting>();
            HelloGreeting Hey = new HelloGreeting
            {
                Id     = 0,
                Name   = "Hello World",
                IsNice = true
            };

            _greetings.Add(Hey);
            _client = new HttpClient {
                BaseAddress = new Uri(serviceURL)
            };
        }
示例#3
0
 //Faked Implementation of Get
 public virtual IEnumerable <IGreeting> Get()
 {
     try
     {
         List <IGreeting> greetingList = new List <IGreeting>();
         HelloGreeting    Hey          = new HelloGreeting {
             Id     = 0,
             Name   = "Hello World",
             IsNice = true
         };
         greetingList.Add(Hey);
         return(greetingList);
     }
     catch (Exception e)
     {
         //Catch Exception
     }
     return(new List <IGreeting>());
 }
示例#4
0
 public virtual IGreeting Insert(IGreeting entity)
 {
     IGreeting greeting = new HelloGreeting(); return(greeting);
 }
示例#5
0
 public virtual IGreeting GetById(int id)
 {
     IGreeting greeting = new HelloGreeting(); return(greeting);
 }