Ejemplo n.º 1
0
		public void equals_should_be_case_insensitive()
		{
			// Arrange
			var info = new RepositoryInfo("SqlDB", "A Sql Server Mongo Redis Document Store");

			// Act + Assert
			Assert.True(info.Equals(new RepositoryInfo("sqldb", "notused")));
		}
Ejemplo n.º 2
0
		public void should_set_properties()
		{
			// Arrange
			var info = new RepositoryInfo("SqlDB", "A Sql Server Mongo Redis Document Store");

			// Act + Assert
			Assert.That(info.Id, Is.EqualTo("SqlDB"));
			Assert.That(info.Description, Is.EqualTo("A Sql Server Mongo Redis Document Store"));
		}
Ejemplo n.º 3
0
		public void id_should_compare_with_string_and_be_case_insensitive()
		{
			// Arrange
			var info = new RepositoryInfo("SqlDB", "A Sql Server Mongo Redis Document Store");

			// Act + Assert
			Assert.True(info == "sqldb");
			Assert.True("sqldb" == info);

			Assert.True(info != "foo");
			Assert.True("foo" != info);
		}
Ejemplo n.º 4
0
		public void id_should_return_false_when_compared_with_null_and_empty_strings()
		{
			// Arrange
			var info = new RepositoryInfo("", "");
			RepositoryInfo nullInfo = null;

			// Act + Assert
			Assert.True(nullInfo == null);

			Assert.False(info == null);
			Assert.False(null == info);
			Assert.False(info == "");
			Assert.False("" == info);

			Assert.True(info != null);
			Assert.True(null != info);		
			Assert.True(info != "");
			Assert.True("" != info);
		}