public async Task Post_Collection_OK()
        {
            var testDomains      = TestData.TestDomains;
            var testTableMock    = DatabaseTablePostMock.GetTestDatabaseTable();
            var testDatabaseMock = DatabaseMock.GetTestDatabase(testTableMock.Object);
            var validateService  = TestValidateServicePostMock.GetDatabaseValidateService();
            var testConverter    = TestEntityConverterMock.TestEntityConverter;
            var testService      = DatabaseServiceMock.GetTestDatabaseService(testDatabaseMock.Object, testTableMock.Object,
                                                                              validateService.Object, testConverter);

            var resultIds = await testService.Post(testDomains);

            Assert.True(resultIds.OkStatus);
            Assert.True(resultIds.Value.SequenceEqual(TestData.GetTestIds(testDomains)));
        }
        public async Task Post_Value_OK()
        {
            var testDomain       = TestData.TestDomains.First();
            var testTableMock    = DatabaseTablePostMock.GetTestDatabaseTable();
            var testDatabaseMock = DatabaseMock.GetTestDatabase(testTableMock.Object);
            var validateService  = TestValidateServicePostMock.GetDatabaseValidateService();
            var testConverter    = TestEntityConverterMock.TestEntityConverter;
            var testService      = DatabaseServiceMock.GetTestDatabaseService(testDatabaseMock.Object, testTableMock.Object,
                                                                              validateService.Object, testConverter);

            var resultId = await testService.Post(testDomain);

            Assert.True(resultId.OkStatus);
            Assert.True(resultId.Value.Equals(testDomain.Id));
        }
        public async Task Post_Value_SavingError()
        {
            var testDomain       = TestData.TestDomains.First();
            var testTableMock    = DatabaseTablePostMock.GetTestDatabaseTable(DatabaseTablePostMock.AddIdError());
            var testDatabaseMock = DatabaseMock.GetTestDatabase(testTableMock.Object);
            var validateService  = TestValidateServicePostMock.GetDatabaseValidateService();
            var testConverter    = TestEntityConverterMock.TestEntityConverter;
            var testService      = DatabaseServiceMock.GetTestDatabaseService(testDatabaseMock.Object, testTableMock.Object,
                                                                              validateService.Object, testConverter);

            var resultId = await testService.Post(testDomain);

            Assert.True(resultId.HasErrors);
            Assert.Equal(ErrorResultType.DatabaseTableAccess, resultId.Errors.First().ErrorResultType);
        }
        public async Task Post_Collection_Error()
        {
            var testDomains      = TestData.TestDomains;
            var testTableMock    = DatabaseTablePostMock.GetTestDatabaseTable();
            var testDatabaseMock = DatabaseMock.GetTestDatabase(testTableMock.Object);
            var validateService  = TestValidateServicePostMock.GetDatabaseValidateService(TestValidateServicePostMock.DuplicateCollectionFunc());
            var testConverter    = TestEntityConverterMock.TestEntityConverter;
            var testService      = DatabaseServiceMock.GetTestDatabaseService(testDatabaseMock.Object, testTableMock.Object,
                                                                              validateService.Object, testConverter);

            var resultIds = await testService.Post(testDomains);

            Assert.True(resultIds.HasErrors);
            Assert.Equal(ErrorResultType.DatabaseValueDuplicate, resultIds.Errors.First().ErrorResultType);
        }