public void it_can_return_changed_dimensions() { // Arrange var original = new FakeDimensionEntity { Key1 = "Key1Value", Key2 = "Key2Value", Dim1 = "Dim1Value", Dim2 = "Dim2Value", Dim3 = "Dim3Value" }; var delta = new FakeDimensionEntity { Key1 = "Key1Value", Key2 = "Key2Value", Dim1 = "Changed", Dim2 = "Dim2Value", Dim3 = "Dim3Value" }; var entityInfo = original.GetEntityProperties(); var update = new Update(_edgeMartUrl, original, delta, entityInfo); // Act var absolute = update.ToUri(UpdateType.Dimension); // Assert Assert.True(absolute.Query.Contains("&filters=Key1:Key1Value&filters=Key2:Key2Value")); Assert.True(absolute.Query.Contains("&dims=Dim1:Dim1Value")); Assert.True(absolute.Query.Contains("&values=Dim1:Changed")); Assert.False(absolute.Query.Contains("&dims=Dim2")); Assert.False(absolute.Query.Contains("&dims=Dim3")); }
public void it_can_get_lists_for_an_entity_with_no_measures() { // Arrange IEntity entity = new FakeDimensionEntity(); // Act IEntityInfo ei = entity.GetEntityProperties(); // Assert Assert.NotNull(ei); Assert.NotNull(ei.Keys); Assert.NotNull(ei.Dimensions); Assert.NotNull(ei.Measures); Assert.AreEqual(2, ei.Keys.Count); Assert.AreEqual(3, ei.Dimensions.Count); Assert.AreEqual(0, ei.Measures.Count); }