public void ReturnsCorrectKeyValue()
            {
                var dbContext = new TestDbContextContainer();

                var keyValue = dbContext.GetEntityKey(typeof(DbContextProduct), 1);

                Assert.AreEqual("Id", keyValue.EntityKeyValues[0].Key);
                Assert.AreEqual(1, keyValue.EntityKeyValues[0].Value);
            }
Exemplo n.º 2
0
            public void ReturnsCorrectKeyValue()
            {
                var dbContext = new TestDbContextContainer();

                var keyValue = dbContext.GetEntityKey(typeof(DbContextProduct), 1);

                Assert.AreEqual("Id", keyValue.EntityKeyValues[0].Key);
                Assert.AreEqual(1, keyValue.EntityKeyValues[0].Value);
            }
Exemplo n.º 3
0
            public void ThrowsArgumentNullExceptionForNulEntityType()
            {
                var dbContext = new TestDbContextContainer();

                ExceptionTester.CallMethodAndExpectException<ArgumentNullException>(() => dbContext.GetEntityKey(null, 1));
            }
            public void ThrowsArgumentNullExceptionForNulEntityType()
            {
                var dbContext = new TestDbContextContainer();

                ExceptionTester.CallMethodAndExpectException<ArgumentNullException>(() => dbContext.GetEntityKey(null, 1));
            }