Пример #1
0
        /// <summary>
        /// Factory method for creating a configured TestStore
        /// </summary>
        /// <returns></returns>
        public static TestStore CreateStoreWithEntityNotFoundBehaviorReturnNull()
        {
            var conventions = new StoreConventions();

            conventions.SetEntityNotFoundBehavior(EntityNotFoundBehavior.ReturnNull);
            return(new TestStore(conventions));
        }
Пример #2
0
        public void SetEntityNotFoundBehavior_Sets__EntityNotFoundBehavior()
        {
            var conventions = new StoreConventions();

            conventions.SetEntityNotFoundBehavior(EntityNotFoundBehavior.ReturnNull);

            conventions.EntityNotFoundBehavior.ShouldBe(EntityNotFoundBehavior.ReturnNull);
        }
Пример #3
0
        public void SetEntityNotFoundBehavior_Sets__EntityNotFoundBehavior()
        {
            var conventions = new StoreConventions();

            conventions.SetEntityNotFoundBehavior(EntityNotFoundBehavior.ReturnNull);

            conventions.EntityNotFoundBehavior.ShouldBe(EntityNotFoundBehavior.ReturnNull);
        }
Пример #4
0
        public void Ctor_Providing_IJsonConverter_Sets_JsonConverter_And_TableInfo_To_Default()
        {
            var jsonConverter = new JilJsonConverter();

            var conventions = new StoreConventions(jsonConverter);

            conventions.JsonConverter.ShouldBeSameAs(jsonConverter);
            conventions.TableInfo.ShouldBeOfType<TableInfo>();
        }
Пример #5
0
        public void Ctor_Providing_IJsonConverter_Sets_JsonConverter_And_TableInfo_To_Default()
        {
            var jsonConverter = new JilJsonConverter();

            var conventions = new StoreConventions(jsonConverter);

            conventions.JsonConverter.ShouldBeSameAs(jsonConverter);
            conventions.TableInfo.ShouldBeOfType <TableInfo>();
        }
Пример #6
0
        public void Ctor_Sets_JsonConverter_And_TableInfo()
        {
            var jsonConverter = new JilJsonConverter();
            var info = new TableInfo();

            var convention = new StoreConventions(jsonConverter, info);

            convention.JsonConverter.ShouldBeSameAs(jsonConverter);
            convention.TableInfo.ShouldBeSameAs(info);
        }
Пример #7
0
        public void Ctor_Sets_JsonConverter_And_TableInfo()
        {
            var jsonConverter = new JilJsonConverter();
            var info          = new TableInfo();

            var convention = new StoreConventions(jsonConverter, info);

            convention.JsonConverter.ShouldBeSameAs(jsonConverter);
            convention.TableInfo.ShouldBeSameAs(info);
        }
Пример #8
0
 /// <summary>
 /// Factory method for creating a configured TestStore
 /// </summary>
 /// <returns></returns>
 public static TestStore CreateStoreWithEntityNotFoundBehaviorReturnNull()
 {
     var conventions = new StoreConventions();
     conventions.SetEntityNotFoundBehavior(EntityNotFoundBehavior.ReturnNull);
     return new TestStore(conventions);
 }