Get() public method

public Get ( FindRockstars request ) : List
request FindRockstars
return List
        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"
            }));
        }
示例#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" }));
        }