public void SetUp() { var profileProperty = Substitute.For <IProfileProperty>(); profileProperty.PropertyName.Returns("Foo"); profileProperty.PropertyType.Returns(typeof(string[])); profileCollectionProperty = new ProfileCollectionPropertyViewModel(profileProperty); }
public void SetUp() { profileProperty = Substitute.For <IProfileProperty>(); profileProperty.PropertyName.Returns("Foo"); profileProperty.PropertyType.Returns(typeof(string[])); profileProperty.PropertyValue = new[] { "Wibble", "Wobble" }; profileCollectionProperty = new ProfileCollectionPropertyViewModel(profileProperty); ((ObservableCollection <IProfileProperty>)profileCollectionProperty.Values)[0].PropertyValue = "Dibble"; }
public void Should_expose_all_the_data(Type dataType, bool isSupported) { profileProperty = Substitute.For <IProfileProperty>(); profileProperty.PropertyType.Returns(Array.CreateInstance(dataType, 0).GetType()); profileCollectionProperty = new ProfileCollectionPropertyViewModel(profileProperty); profileCollectionProperty.IsSupportedDataType.Should().Be(isSupported); }