public void OPA_TemporalValueItem_ChangePointDateNotMatch() { //ARRANGE var changePointDateNotMatch = changePointDefaultDate.AddDays(10); //ACT var temporalValueItemChangePointDateNotMatch = new TemporalValueItem(changePointDateNotMatch, changePointDefaultValue, changePointDefaultType); //ASSERT temporalValueItemChangePointDateNotMatch.ChangePoint.Should().NotBeSameDateAs(changePointDefaultDate); }
public void OPA_TemporalValueItem_ChangePointValueMatch() { //ARRANGE // Use Test Helpers //ACT var temporalValueItemValue = new TemporalValueItem(changePointDefaultDate, changePointDefaultValue, changePointDefaultType); //ASSERT temporalValueItemValue.Value.Should().BeEquivalentTo(changePointDefaultValue); }
public void OPA_TemporalValueItem_DoesNotMatch() { //ARRANGE object changePointValueNotMatch = 200; //ACT var temporalValueItemNotMatch = new TemporalValueItem(changePointDefaultDate, changePointValueNotMatch, changePointDefaultType); //ASSERT temporalValueItemNotMatch.Should().NotBeSameAs(temporalValueItemDefault); }
public void OPA_TemporalValueItem_ChangePointDateMatch() { //ARRANGE // Use Test Helpers //ACT var temporalValueItemChangePointDate = new TemporalValueItem(changePointDefaultDate, changePointDefaultValue, changePointDefaultType); //ASSERT temporalValueItemChangePointDate.ChangePoint.Should().BeSameDateAs(changePointDefaultDate); }
public void OPA_TemporalValueItem_ChangePointTypeNotMatch() { //ARRANGE string changePointDefaultTypeNotMatch = "Unmatched Type"; //ACT var temporalValueItemTypeNotMatch = new TemporalValueItem(changePointDefaultDate, changePointDefaultValue, changePointDefaultTypeNotMatch); //ASSERT temporalValueItemTypeNotMatch.Type.Should().NotBeSameAs(changePointDefaultType); }
public void OPA_TemporalValueItem_DoesExist() { //ARRANGE // Use Test Helpers //ACT var temporalValueItemNotNull = new TemporalValueItem(changePointDefaultDate, changePointDefaultValue, changePointDefaultType); //ASSERT temporalValueItemNotNull.Should().NotBeNull(); }
public void AddChangePoint() { var attributeData = new AttributeData(null); var temporalValueItem = new TemporalValueItem(new DateTime(2017, 1, 1), null, null); attributeData.AddChangepoint(temporalValueItem); attributeData.Changepoints.Should().HaveCount(1); attributeData.Changepoints.Should().Contain(temporalValueItem); }
public void Constructor() { var changePoint = new DateTime(2017, 1, 1); var value = 1; var type = "Type"; var temporalValueItem = new TemporalValueItem(changePoint, value, type); temporalValueItem.ChangePoint.Should().Be(changePoint); temporalValueItem.Value.Should().Be(value); temporalValueItem.Type.Should().Be(type); }
public void AddChangePoint_Multiple() { var attributeData = new AttributeData(null); var temporalValueItemOne = new TemporalValueItem(new DateTime(2017, 1, 1), null, null); var temporalValueItemTwo = new TemporalValueItem(new DateTime(2017, 1, 1), null, null); attributeData.AddChangepoint(temporalValueItemOne); attributeData.AddChangepoint(temporalValueItemTwo); attributeData.Changepoints.Should().HaveCount(2); attributeData.Changepoints.Should().Contain(temporalValueItemOne); attributeData.Changepoints.Should().Contain(temporalValueItemTwo); }
public void OPA_AttributeData_Changepoints_DoesNotMatch() { //ARRANGE var changePointNotMatch = new TemporalValueItem(attributeCPDefaultDate, attributeCPDefaultValue, "IncorrectType"); //ACT var attributeDataChangepointsNotMatch = new AttributeData(attributeDataDefaultName, attributeDataDefaultValue); attributeDataChangepointsNotMatch.Changepoints.Add(changePointNotMatch); //ASSERT attributeDataChangepointsNotMatch.Changepoints.First().Should().NotBeSameAs(attributeTemporalValueItemDefault); }
public void OPA_AttributeData_Changepoints_DoesMatch() { //ARRANGE var changePointMatch = new TemporalValueItem(attributeCPDefaultDate, attributeCPDefaultValue, attributeCPDefaultType); //ACT var attributeDataChangepointsMatch = new AttributeData(attributeDataDefaultName, attributeDataDefaultValue); attributeDataChangepointsMatch.Changepoints.Add(changePointMatch); //ASSERT attributeDataChangepointsMatch.Changepoints.Should().BeEquivalentTo(attributeTemporalValueItemDefault); }
public void AddChangePoints() { var temporalValueItemOne = new TemporalValueItem(new DateTime(2017, 1, 1), null, null); var temporalValueItemTwo = new TemporalValueItem(new DateTime(2017, 1, 1), null, null); var temporalValueItemThree = new TemporalValueItem(new DateTime(2017, 1, 1), null, null); var changePointCountValues = new List <TemporalValueItem> { temporalValueItemOne, temporalValueItemTwo, temporalValueItemThree, }; var attributeData = new AttributeData(null); attributeData.AddChangepoints(changePointCountValues); attributeData.Changepoints.Should().HaveCount(3); attributeData.Changepoints.Should().Contain(new[] { temporalValueItemOne, temporalValueItemTwo, temporalValueItemThree }); }