Пример #1
0
 /// <summary>
 /// Get Logins
 /// </summary>
 /// <returns></returns>
 public async Task<IEnumerable<Login>> Get()
 {
     var loginRepository = new LoginRepository();
     var logins = await loginRepository.GetLogins();
     return logins;
     //var login1 = new Login() { DomainUserId = 1};
     //var login2 = new Login() { DomainUserId = 2};
     //return new List<Login> {login1, login2};
 }
        public async void GetLogins_GivenNothing_ShouldReturnLoginList()
        {
            //---------------Set up test pack-------------------
            var loginRepository = new LoginRepository();
            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            var logins = await loginRepository.GetLogins();
            //---------------Test Result -----------------------
            Assert.IsNotNull(logins);
            Assert.IsTrue(logins.Any());
        }