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

            Assert.That(converter.GenerateKey(new object[] { null, 42 }, "/", typeof(MockEntityObject)),
                        Is.EqualTo("42"));
        }
コード例 #2
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"));
 }
コード例 #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"));
        }
コード例 #4
0
 public void TestConvertMultipleValuesIgnoresNulls()
 {
     var converter = new DefaultKeyConverter();
     Assert.That(converter.GenerateKey(new object[]{null, 42}, "/", typeof(MockEntityObject)), 
         Is.EqualTo("42"));
 }