public void UniqueTest() { TestData TestData = new TestData(gateway.Accessor); DbGateway dbGateway = new DbGateway(gateway.Accessor); gateway.CreateTable(typeof(User)); User user = TestData.TestUser; dbGateway.Insert(user); try { dbGateway.Insert(user); Assert.Fail(); } catch { } }