public void IPropertyViewObject() { PropertyViewProvider provider = new PropertyViewProvider(); TestObjectWithView testObject = new TestObjectWithView(); provider.GetTypeView(testObject).ShouldBeEquivalentTo(testObject); }
public void IPropertyViewObject() { PropertyViewProvider provider = new PropertyViewProvider(); TestObjectWithView testObject = new TestObjectWithView(); provider.GetTypeView(testObject).Should().Equal(testObject); }
public void DefaultAdapter() { PropertyViewProvider provider = new PropertyViewProvider(); Guid guid = Guid.NewGuid(); IPropertyView view = provider.GetTypeView(guid); view.ToString().Should().Be(guid.ToString()); view.Should().HaveCount(0); }
public void DefaultAdapter() { PropertyViewProvider provider = new PropertyViewProvider(); Guid guid = Guid.NewGuid(); IPropertyView view = provider.GetTypeView(guid); view.ToString().Should().Be(guid.ToString()); view.Should().HaveCount(0); }
public void RegisteredAdapter() { PropertyViewProvider provider = new PropertyViewProvider(); provider.RegisterPropertyViewer<string>(TestViewAdapter.Create); string testObject = "Crazy!"; IPropertyView view = provider.GetTypeView(testObject); view.ToString().Should().Be("Crazy!"); view.Should().HaveCount(2); IProperty<object> property = view.First(); property.Name.Should().Be("Upper"); property.Value.Should().Be("CRAZY!"); }
public void RegisteredAdapter() { PropertyViewProvider provider = new PropertyViewProvider(); provider.RegisterPropertyViewer <string>(TestViewAdapter.Create); string testObject = "Crazy!"; IPropertyView view = provider.GetTypeView(testObject); view.ToString().Should().Be("Crazy!"); view.Should().HaveCount(2); IProperty <object> property = view.First(); property.Name.Should().Be("Upper"); property.Value.Should().Be("CRAZY!"); }
public void HandleOutput(object value) { // Transform the output objects to MSBuild ITaskItems IPropertyView view = PropertyViewProvider.GetTypeView(value); MSBuildFramework.ITaskItem taskItem = new TaskItem { ItemSpec = view.ToString() }; foreach (var property in view) { taskItem.SetMetadata(property.Name, property.Value.ToString()); } _output.Add(taskItem); }
protected BuildTaskBridge(IFileService fileService) { _fileService = fileService; PropertyViewProvider = new PropertyViewProvider(); }
public void IPropertyViewObject() { PropertyViewProvider provider = new PropertyViewProvider(); TestObjectWithView testObject = new TestObjectWithView(); provider.GetTypeView(testObject).ShouldBeEquivalentTo(testObject); }
protected BuildTaskBridge(IFileService fileService) { _fileService = fileService; PropertyViewProvider = new PropertyViewProvider(); }