public void IPropertyViewObject() { PropertyViewProvider provider = new PropertyViewProvider(); TestObjectWithView testObject = new TestObjectWithView(); provider.GetTypeView(testObject).Should().Equal(testObject); }
public void IPropertyViewObject() { PropertyViewProvider provider = new PropertyViewProvider(); TestObjectWithView testObject = new TestObjectWithView(); provider.GetTypeView(testObject).ShouldBeEquivalentTo(testObject); }
public void TestOutput() { TestBuildTaskBridge bridge = new TestBuildTaskBridge(); TestObjectWithView testObject = new TestObjectWithView(); testObject.Properties.Add("foo", "bar"); testObject.Properties.Add("whiz", "bang"); bridge.HandleOutput(testObject); var output = bridge.Output; output.Should().HaveCount(1, "only one item was output"); output[0].MetadataCount.Should().Be(2, "two metadata items"); output[0].GetMetadata("foo").Should().Be("bar"); output[0].GetMetadata("whiz").Should().Be("bang"); output[0].ItemSpec.Should().Be("XTask.Tests.Build.BuildTaskBridgeTests+TestObjectWithView", "should be default ToString()"); }
public void TestOutput() { TestBuildTaskBridge bridge = new TestBuildTaskBridge(); TestObjectWithView testObject = new TestObjectWithView(); testObject.Properties.Add("foo", "bar"); testObject.Properties.Add("whiz", "bang"); bridge.HandleOutput(testObject); var output = bridge.Output; output.Should().HaveCount(1, "only one item was output"); output[0].MetadataCount.Should().Be(2, "two metadata items"); output[0].GetMetadata("foo").Should().Be("bar"); output[0].GetMetadata("whiz").Should().Be("bang"); output[0].ItemSpec.Should().Be("XTask.Tests.Build.BuildTaskBridgeTests+TestObjectWithView", "should be default ToString()"); }
public void IPropertyViewObject() { PropertyViewProvider provider = new PropertyViewProvider(); TestObjectWithView testObject = new TestObjectWithView(); provider.GetTypeView(testObject).ShouldBeEquivalentTo(testObject); }