예제 #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);
        }
예제 #2
0
        public void GetClientById_PassNewGuid_ThrowsKeyNotFoundException()
        {
            IClientDAL clientDAL = new ClientDAL(new DBService(new DbConnectionService(_connectionStringName)));

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