Get() public method

public Get ( FindRockstars request ) : List
request FindRockstars
return List
Ejemplo n.º 1
0
        public void Using_manual_dependency_injection()
        {
            var service = new SimpleService
            {
                RockstarRepository = new RockstarRepositoryMock()
            };

            var status = service.Get(new GetStatus {
                LastName = "Vedder"
            });

            Assert.That(status.Age, Is.EqualTo(48));
            Assert.That(status.Alive, Is.True);

            Assert.Throws <HttpError>(() =>
                                      service.Get(new GetStatus {
                LastName = "Hendrix"
            }));
        }
Ejemplo n.º 2
0
        public void Using_manual_dependency_injection()
        {
            var service = new SimpleService
            {
                RockstarRepository = new RockstarRepositoryMock()
            };

            var status = service.Get(new GetStatus { LastName = "Vedder" });
            Assert.That(status.Age, Is.EqualTo(48));
            Assert.That(status.Alive, Is.True);

            Assert.Throws<HttpError>(() =>
                service.Get(new GetStatus { LastName = "Hendrix" }));
        }