Exemplo n.º 1
0
        [ExcludeFromCodeCoverage] // Expression isn't "executed"
        public static void GetTypeExistsCriteria_GuardClause()
        {
            var mapping = new ElasticMapping();

            Assert.Throws<ArgumentNullException>(() => mapping.GetTypeExistsCriteria(null));
        }
Exemplo n.º 2
0
        public static void GetTypeExistsCriteria()
        {
            var mapping = new ElasticMapping();

            var criteria = mapping.GetTypeExistsCriteria(typeof(FormatClass));

            var exists = Assert.IsType<ExistsCriteria>(criteria);
            Assert.Equal("integerValue", exists.Field);
        }