public void IsObjectValidTest() { var output = new List<bool>(); var fixture = new ValidatedTestFixture(); //fixture.IsValidObservable.Subscribe(output.Add); Assert.False(fixture.IsObjectValid()); fixture.IsNotNullString = "foo"; Assert.False(fixture.IsObjectValid()); fixture.IsOnlyOneWord = "Foo Bar"; Assert.False(fixture.IsObjectValid()); fixture.IsOnlyOneWord = "Foo"; Assert.True(fixture.IsObjectValid()); fixture.IsOnlyOneWord = ""; Assert.False(fixture.IsObjectValid()); /* new[] { false, false, false, true, false }.Zip(output, (expected, actual) => new { expected, actual }) .Do(Console.WriteLine) .ForEach(x => Assert.Equal(x.expected, x.actual)); */ }
public void IsObjectValidTest() { var output = new List <bool>(); var fixture = new ValidatedTestFixture(); //fixture.IsValidObservable.Subscribe(output.Add); Assert.False(fixture.IsObjectValid()); fixture.IsNotNullString = "foo"; Assert.False(fixture.IsObjectValid()); fixture.IsOnlyOneWord = "Foo Bar"; Assert.False(fixture.IsObjectValid()); fixture.IsOnlyOneWord = "Foo"; Assert.True(fixture.IsObjectValid()); fixture.IsOnlyOneWord = ""; Assert.False(fixture.IsObjectValid()); /* * new[] { false, false, false, true, false }.Zip(output, (expected, actual) => new { expected, actual }) * .Do(Console.WriteLine) * .ForEach(x => Assert.Equal(x.expected, x.actual)); */ }