Exemplo n.º 1
0
        public void GetClientById_PassValidGuid_ReturnsClientInstance()
        {
            IClientDAL clientDAL = new ClientDAL(new DBService(new DbConnectionService(_connectionStringName)));
            IClient    client    = clientDAL.GetClientById(DbSeeder.TestClientId);

            Assert.IsTrue(client != null);
        }
Exemplo n.º 2
0
        public void GetClientById_PassNewGuid_ThrowsKeyNotFoundException()
        {
            IClientDAL clientDAL = new ClientDAL(new DBService(new DbConnectionService(_connectionStringName)));

            Assert.ThrowsException <KeyNotFoundException>(() => clientDAL.GetClientById(Guid.NewGuid()));
        }