public void Constructor_ExpectedValues() { // Setup & Call var properties = new ForeshoreGeometryProperties(); // Assert Assert.IsInstanceOf <ObjectProperties <ForeshoreProfile> >(properties); Assert.IsNull(properties.Data); Assert.IsEmpty(properties.ToString()); }
public void Data_SetNewForeshoreProfileInstance_ReturnCorrectPropertyValues() { // Setup var properties = new ForeshoreGeometryProperties(); // Call properties.Data = new TestForeshoreProfile(); // Assert CollectionAssert.IsEmpty(properties.Coordinates); }
public void Data_SetForeshoreProfileInstanceWithData_ReturnCorrectPropertyValues() { // Setup var foreshoreProfile = new TestForeshoreProfile(new[] { new Point2D(0, 0), new Point2D(1, 1) }); var properties = new ForeshoreGeometryProperties(); // Call properties.Data = foreshoreProfile; // Assert var expectedCoordinates = new[] { new Point2D(0, 0), new Point2D(1, 1) }; CollectionAssert.AreEqual(expectedCoordinates, properties.Coordinates); }
public void Constructor_Always_PropertiesHaveExpectedAttributesValues() { // Setup var foreshoreProfile = new TestForeshoreProfile(); // Call var properties = new ForeshoreGeometryProperties { Data = foreshoreProfile }; // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(1, dynamicProperties.Count); PropertyDescriptor coordinatesProperty = dynamicProperties[0]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(coordinatesProperty, "Misc", "Coördinaten [m]", "Lijst met punten in lokale coördinaten.", true); }