public void TestNotLessThanFalse() { Assert.Throws <XAssertionFailedException>(() => { XAssert.That(1, IsNot.LessThan(2)); }); }
public void TestInequalityFalse() { Assert.Throws <XAssertionFailedException>(() => { XAssert.That("A", IsNot.EqualTo("A")); }); }
public void TestNotGreaterThanFalse() { Assert.Throws <XAssertionFailedException>(() => { XAssert.That(2, IsNot.GreaterThan(1)); }); }
public void TestIsNotEmptyStringFalse() { Assert.Throws <XAssertionFailedException>(() => { XAssert.That(string.Empty, IsNot.EmptyString()); }); }
public void TestNotContainsStringFalse() { Assert.Throws <XAssertionFailedException>(() => { XAssert.That("string", IsNot.MatchFor("str")); }); }
public void TestsCanBeChained() { XAssert .That("string", IsNot.EmptyString()) .And(Is.MatchFor("ing")) .And(Is.MatchFor("str")); }
public void TestIsNotTrueFalse() { Assert.Throws <XAssertionFailedException>(() => { XAssert.That(true, IsNot.True()); }); }
public void TestNotErroringWithFalse() { XAssert.That(() => { var a = 1; }, IsNot.ErroringWith <System.IO.DirectoryNotFoundException>()); }
public void TestNotErroringWithTrue() { XAssert.That(() => { var a = 1; }, IsNot.ErroringWith <XAssertionFailedException>()); }
public void TestNotNullFalse() { Assert.Throws <XAssertionFailedException>(() => { XAssert.That(null, IsNot.Null()); }); }
public void TestIsNotFalseFalse() { Assert.Throws <XAssertionFailedException>(() => { XAssert.That(false, IsNot.False()); }); }
public void TestNotContainsItemTrue() { var test = new List <string> { "test2" }; XAssert.That(test, IsNot.Storing("test")); }
public void TestNotContainsRegexFalse() { Assert.Throws <XAssertionFailedException>(() => { var re = new Regex("str"); XAssert.That("string", IsNot.MatchFor(re)); }); }
public void TestNotEmptyOrNullWithFalse() { Assert.Throws <XAssertionFailedException>(() => { ICollection <string> testVar = new List <string>(); XAssert.That(testVar, IsNot.EmptyOrNull()); }); }
public void TestNotEmptyOrNullWithTrue() { ICollection <string> testVar = new List <string> { "test" }; XAssert.That(testVar, IsNot.EmptyOrNull()); }
public void No_match_if_inner_matcher_matches() { var isNot = new IsNot <string>(always); var matches = isNot.Matches("test"); Assert.That(matches, Is.EqualTo(false)); }
public void TestNotEmptyWithFalse() { Assert.Throws <XAssertionFailedException>(() => { var testVar = new List <string>(); XAssert.That(testVar, IsNot.Empty()); }); }
public void No_match_if_inner_matcher_matches() { var isNot = new IsNot<string>(always); var matches = isNot.Matches("test"); Assert.That(matches, Is.EqualTo(false)); }
public void TestsCanBeChainedSecondFails() { Assert.Throws <XAssertionFailedException>(() => { XAssert .That("test2", IsNot.EmptyString()) .And(Is.EqualTo("test")); }); }
public void TestNotEmptyWithTrue() { var testVar = new List <string>() { "test" }; XAssert.That(testVar, IsNot.Empty()); }
public void TestChainedWithQueryTrue() { var myList = new List <int> { 1, 2, 3 }; XAssert .That(myList, IsNot.Null <List <int> >()) .And(m => m.Count, Is.EqualTo(3)); }
public void TestNotContainsItemFalse() { Assert.Throws <XAssertionFailedException>(() => { var test = new List <string> { "test2" }; XAssert.That(test, IsNot.Storing("test2")); }); }
public virtual void TestPolicyNotSetByDefault() { StartUpCluster(false, -1); string MethodName = GenericTestUtils.GetMethodName(); Path path = new Path("/" + MethodName + ".dat"); MakeTestFile(path, 0, false); // Stat the file and check that the LAZY_PERSIST policy is not // returned back. HdfsFileStatus status = client.GetFileInfo(path.ToString()); Assert.AssertThat(status.GetStoragePolicy(), IsNot.Not(LazyPersistPolicyId)); }
public void TestNotContainsWithQueryFalse() { var myList = new List <Person> { new Person { Name = "Kaylee", Age = 33 }, new Person { Name = "Cloud", Age = 29 } }; XAssert.That(myList, IsNot.Storing <Person>(l => l.Name == "Biff")); }
public void TestNotContainsWithQueryTrue() { var myList = new List <Person> { new Person { Name = "Kaylee", Age = 33 }, new Person { Name = "Cloud", Age = 29 } }; Assert.Throws <XAssertionFailedException>(() => { XAssert.That(myList, IsNot.Storing <Person>(l => l.Name == "Kaylee")); }); }
/// <exception cref="System.IO.IOException"/> public virtual void TestServiceRpcBindHostKey() { Configuration conf = new HdfsConfiguration(); MiniDFSCluster cluster = null; Log.Info("Testing without " + DfsNamenodeServiceRpcBindHostKey); conf.Set(DfsNamenodeServiceRpcAddressKey, LocalhostServerAddress); // NN should not bind the wildcard address by default. try { cluster = new MiniDFSCluster.Builder(conf).NumDataNodes(0).Build(); cluster.WaitActive(); string address = GetServiceRpcServerAddress(cluster); Assert.AssertThat("Bind address not expected to be wildcard by default.", address , IsNot.Not("/" + WildcardAddress)); } finally { if (cluster != null) { cluster.Shutdown(); cluster = null; } } Log.Info("Testing with " + DfsNamenodeServiceRpcBindHostKey); // Tell NN to bind the wildcard address. conf.Set(DfsNamenodeServiceRpcBindHostKey, WildcardAddress); // Verify that NN binds wildcard address now. try { cluster = new MiniDFSCluster.Builder(conf).NumDataNodes(0).Build(); cluster.WaitActive(); string address = GetServiceRpcServerAddress(cluster); Assert.AssertThat("Bind address " + address + " is not wildcard.", address, IS.Is ("/" + WildcardAddress)); } finally { if (cluster != null) { cluster.Shutdown(); } } }
public override void BeforeEachTest() { isNot = new IsNot(); base.BeforeEachTest(); }
public void TestNotContainsRegexTrue() { var re = new Regex("bibble"); XAssert.That("mystring", IsNot.MatchFor(re)); }
public void TestNotGreaterThanTrue() { XAssert.That(1, IsNot.GreaterThan(2)); }
public void TestIsNotTrueTrue() { XAssert.That(false, IsNot.True()); }
public void TestNotLessThanTrue() { XAssert.That(2, IsNot.LessThan(1)); }
public void TestIsNotFalseTrue() { XAssert.That(true, IsNot.False()); }