Пример #1
0
        public void EntityPersistenceContainerTest()
        {
            var configurationSettings = _fixture.Container.GetInstance <IConfigurationSettings>();

            configurationSettings.MasterKey = "Test1234";
            IEntityPersistence <PasswordEntity> entityPersistence = _fixture.Container.GetInstance <IEntityPersistence <PasswordEntity> >();

            _fixture.Cleanup();
            entityPersistence.EnsureList();


            bool success = entityPersistence.PutList(new List <PasswordEntity>
            {
                new PasswordEntity
                {
                    CommonName = "Amazon",
                    Url        = "www.amazon.com",
                    UserName   = "******",
                    Password   = "******"
                }
            });

            // assert
            success.ShouldBeTrue();
        }
Пример #2
0
 public bool EnsureRepository()
 {
     return(_persistence.EnsureList());
 }