Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General cleanup + incremental support #7

Merged
merged 1 commit into from
Dec 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,59 +57,59 @@
<Reference Include="CommonServiceLocator, Version=2.0.4.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
<HintPath>..\packages\Unity.5.8.13\lib\net46\CommonServiceLocator.dll</HintPath>
</Reference>
<Reference Include="Fabric.Databus.Client, Version=1.1.18350.14, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18350.14\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.Client.dll</HintPath>
<Reference Include="Fabric.Databus.Client, Version=1.1.18351.2, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18351.2\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.Client.dll</HintPath>
</Reference>
<Reference Include="Fabric.Databus.Config, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18350.14\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.Config.dll</HintPath>
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18351.2\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.Config.dll</HintPath>
</Reference>
<Reference Include="Fabric.Databus.Domain, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18350.14\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.Domain.dll</HintPath>
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18351.2\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.Domain.dll</HintPath>
</Reference>
<Reference Include="Fabric.Databus.ElasticSearch, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18350.14\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.ElasticSearch.dll</HintPath>
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18351.2\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.ElasticSearch.dll</HintPath>
</Reference>
<Reference Include="Fabric.Databus.Http, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18350.14\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.Http.dll</HintPath>
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18351.2\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.Http.dll</HintPath>
</Reference>
<Reference Include="Fabric.Databus.Interfaces, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18350.14\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.Interfaces.dll</HintPath>
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18351.2\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.Interfaces.dll</HintPath>
</Reference>
<Reference Include="Fabric.Databus.Json, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18350.14\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.Json.dll</HintPath>
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18351.2\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.Json.dll</HintPath>
</Reference>
<Reference Include="Fabric.Databus.PipelineRunner, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18350.14\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.PipelineRunner.dll</HintPath>
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18351.2\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.PipelineRunner.dll</HintPath>
</Reference>
<Reference Include="Fabric.Databus.PipelineSteps, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18350.14\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.PipelineSteps.dll</HintPath>
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18351.2\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.PipelineSteps.dll</HintPath>
</Reference>
<Reference Include="Fabric.Databus.ProgressMonitors, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18350.14\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.ProgressMonitors.dll</HintPath>
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18351.2\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.ProgressMonitors.dll</HintPath>
</Reference>
<Reference Include="Fabric.Databus.QueueItems, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18350.14\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.QueueItems.dll</HintPath>
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18351.2\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.QueueItems.dll</HintPath>
</Reference>
<Reference Include="Fabric.Databus.Schema, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18350.14\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.Schema.dll</HintPath>
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18351.2\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.Schema.dll</HintPath>
</Reference>
<Reference Include="Fabric.Databus.Shared, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18350.14\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.Shared.dll</HintPath>
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18351.2\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.Shared.dll</HintPath>
</Reference>
<Reference Include="Fabric.Databus.SqlGenerator, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18350.14\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.SqlGenerator.dll</HintPath>
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18351.2\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.SqlGenerator.dll</HintPath>
</Reference>
<Reference Include="Fabric.Databus.ZipCodeToGeoCode, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18350.14\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.ZipCodeToGeoCode.dll</HintPath>
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18351.2\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Databus.ZipCodeToGeoCode.dll</HintPath>
</Reference>
<Reference Include="Fabric.Shared, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18350.14\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Shared.dll</HintPath>
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18351.2\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Shared.dll</HintPath>
</Reference>
<Reference Include="Fabric.Shared.ReliableHttp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18350.14\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Shared.ReliableHttp.dll</HintPath>
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18351.2\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Shared.ReliableHttp.dll</HintPath>
</Reference>
<Reference Include="Fabric.Shared.ReliableSql, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18350.14\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Shared.ReliableSql.dll</HintPath>
<HintPath>..\packages\Catalyst.Fabric.Databus.Client.1.1.18351.2\lib\netstandard2.0\bin\Release\netstandard2.0\Fabric.Shared.ReliableSql.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.DotNet.PlatformAbstractions, Version=2.0.4.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace Catalyst.HierarchicalDataConverter.AutomatedTests
using System.Reflection;

using Catalyst.DataProcessing.Shared.Utilities.Client;
using Catalyst.DataProcessing.Shared.Utilities.Context;

using DataConverter;

Expand Down Expand Up @@ -45,7 +46,8 @@ public void TestReadingTheConfig()
configName);
File.Copy(configFileLocation, configFileNewLocation, true);
var serviceClientMock = new Mock<IMetadataServiceClient>();
var converter = new HierarchicalDataTransformer(serviceClientMock.Object);
var processingContextWrapperFactoryMock = new Mock<IProcessingContextWrapperFactory>();
var converter = new HierarchicalDataTransformer(serviceClientMock.Object, processingContextWrapperFactoryMock.Object);
var privateMethodRunner = new PrivateObject(converter);
var args = new object[1] { configName };
var config = (HierarchicalConfiguration)privateMethodRunner.Invoke("GetConfigurationFromJsonFile", args);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Catalyst.HierarchicalDataConverter.AutomatedTests
namespace Catalyst.HierarchicalDataConverter.AutomatedTests
{
using System.Collections.Generic;
using System;
using System.Linq;
using System.Threading.Tasks;

using Catalyst.DataProcessing.Shared.Models.DataProcessing;
using Catalyst.DataProcessing.Shared.Models.Enums;
using Catalyst.DataProcessing.Shared.Models.Metadata;
using Catalyst.DataProcessing.Shared.Utilities.Client;
using Catalyst.DataProcessing.Shared.Utilities.Context;

using DataConverter;

using Fabric.Databus.Config;

using Microsoft.VisualStudio.TestTools.UnitTesting;

using Moq;

[TestClass]
Expand All @@ -27,7 +28,7 @@ public class GrandparentParentChildTest
[TestMethod]
public void GrandparentParentChild()
{
Binding[] bindings = new Binding[3]
Binding[] bindings = new Binding[]
{
this.GetNestedBindingLevel0Source(),
this.GetNestedBindingLevel1Source(),
Expand All @@ -48,9 +49,14 @@ public void GrandparentParentChild()
serviceClientMock.Setup(mock => mock.GetEntityAsync(1)).Returns(Task.FromResult(this.GetLevel1SourceEntity()));
serviceClientMock.Setup(mock => mock.GetEntityAsync(2)).Returns(Task.FromResult(this.GetLevel2SourceEntity()));

var converter = new HierarchicalDataTransformer(serviceClientMock.Object);
var processingContextWrapperFactoryMock = new Mock<IProcessingContextWrapperFactory>();
var processingContextWrapperMock = new Mock<IProcessingContextWrapper>();
processingContextWrapperFactoryMock.Setup(mock => mock.CreateProcessingContextWrapper()).Returns(processingContextWrapperMock.Object);
processingContextWrapperMock.Setup(mock => mock.GetIncrementalValue(It.IsAny<IncrementalConfiguration>())).Returns(new IncrementalValue { LastMaxIncrementalDate = DateTime.Now });

var converter = new HierarchicalDataTransformer(serviceClientMock.Object, processingContextWrapperFactoryMock.Object);
var privateMethodRunner = new PrivateObject(converter);
object[] args = new object[2] { this.GetNestedBindingLevel0Source(), this.GetNestedDestinationEntity() };
object[] args = new object[] { this.GetNestedBindingLevel0Source(), new BindingExecution(), this.GetNestedDestinationEntity() };

var jobData = ((Task<JobData>)privateMethodRunner.Invoke("GetJobData", args)).Result;

Expand Down Expand Up @@ -89,7 +95,6 @@ public void GrandparentParentChild()
Assert.AreEqual("[MyDatabaseName].[Level1TableName].[Level1Entity]", thirdSource.Relationships.Last().Source.Entity);
Assert.AreEqual("'id1'", thirdSource.Relationships.Last().Source.Key);


Assert.AreEqual(1, secondSource.Relationships.Count());
Assert.AreEqual("[MyDatabaseName].[Level1TableName].[Level1Entity]", secondSource.Relationships.First().Destination.Entity);
Assert.AreEqual("'id0'", secondSource.Relationships.First().Destination.Key);
Expand Down Expand Up @@ -511,6 +516,5 @@ private Entity GetLevel2SourceEntity()

return entity;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package id="Castle.Core" version="4.3.1" targetFramework="net461" />
<package id="Catalyst.DataProcessing.Engine.Plugins" version="4.4.1812.1201" targetFramework="net461" />
<package id="Catalyst.DataProcessing.Shared.Utilities" version="4.4.1812.1201" targetFramework="net461" />
<package id="Catalyst.Fabric.Databus.Client" version="1.1.18350.14" targetFramework="net461" />
<package id="Catalyst.Fabric.Databus.Client" version="1.1.18351.2" targetFramework="net461" />
<package id="Catalyst.Platform.CommonExtensions" version="1.0.11" targetFramework="net461" />
<package id="Microsoft.DotNet.PlatformAbstractions" version="2.0.4" targetFramework="net461" />
<package id="Microsoft.Extensions.Configuration" version="2.2.0" targetFramework="net461" />
Expand Down
Loading