public void ValidCompositValueTypeKeys_TryBuildForMultitypeCompositeKey_SuccessfulyBuilt() { //Arrange var builder = new PrimaryKeyExpressionBuilder(); using var ctx = new MyDbContext(); //Act var buildKeyPredicteOpres = builder.TryBuildForMultiTypeCompositeKey <SameValueTypeComposedKeysEntity>( ctx, compositeKeyParts: new object[] { 1, 2, 3 }); //Assert Assert.IsTrue(buildKeyPredicteOpres, buildKeyPredicteOpres.ErrorMessage); }
public void InvalidTypeOfCompositValueTypeKeys_TryBuildForMultitypeCompositeKey_BuiltFailure() { //Arrange var builder = new PrimaryKeyExpressionBuilder(); using var ctx = new MyDbContext(); //Act var buildKeyPredicteOpres = builder.TryBuildForMultiTypeCompositeKey <SameValueTypeComposedKeysEntity>( ctx, compositeKeyParts: new object[] { 1, 2, "3" }); //Assert Assert.IsFalse(buildKeyPredicteOpres, buildKeyPredicteOpres.ErrorMessage); }