public void AnyParameter001() { // Arrange var container = new List <string>(); var parameter = new AnyParameter <TestDocument>(); parameter.Configure("x", "y"); // Act parameter.Execute(container); // Assert Assert.Equal(1, container.Count); Assert.Equal("x=y", container[0]); }
public void AnyParameter001() { // Arrange var container = new List <string>(); var parameter = new AnyParameter { Name = "x", Value = "y" }; // Act parameter.Execute(); parameter.AddResultInContainer(container); // Assert Assert.Single(container); Assert.Equal("x=y", container[0]); }
public void AnyParameter001() { // Arrange var expected = JObject.Parse(@" { ""params"":{ ""x"": ""y"" } }"); string actual; var jObject = new JObject(); var parameter = new AnyParameter <TestDocument>(); parameter.Configure("x", "y"); // Act parameter.Execute(jObject); actual = jObject.ToString(); // Assert Assert.Equal(expected.ToString(), actual); }