示例#1
0
        public void TestConvertMultipleValuesIgnoresNulls()
        {
            var converter = new DefaultKeyConverter();

            Assert.That(converter.GenerateKey(new object[] { null, 42 }, "/", typeof(MockEntityObject)),
                        Is.EqualTo("42"));
        }
 public void TestConvertMultipleValues()
 {
     var converter = new DefaultKeyConverter();
     var objectValue = new MockEntityObject {Key = "foo"};
     const int intValue = 42;
     Assert.That(converter.GenerateKey(new object[]{objectValue, intValue},"/", typeof(MockEntityObject)),
         Is.EqualTo("foo/42"));
 }
示例#3
0
        public void TestConvertMultipleValues()
        {
            var converter   = new DefaultKeyConverter();
            var objectValue = new MockEntityObject {
                Key = "foo"
            };
            const int intValue = 42;

            Assert.That(converter.GenerateKey(new object[] { objectValue, intValue }, "/", typeof(MockEntityObject)),
                        Is.EqualTo("foo/42"));
        }
 public void TestConvertMultipleValuesIgnoresNulls()
 {
     var converter = new DefaultKeyConverter();
     Assert.That(converter.GenerateKey(new object[]{null, 42}, "/", typeof(MockEntityObject)), 
         Is.EqualTo("42"));
 }