コード例 #1
0
        public void Can_Delete_MemberType()
        {
            // Arrange
            IScopeProvider provider = ScopeProvider;

            using (IScope scope = provider.CreateScope())
            {
                MemberTypeRepository repository = CreateRepository(provider);

                // Act
                IMemberType memberType = MemberTypeBuilder.CreateSimpleMemberType();
                repository.Save(memberType);

                IMemberType contentType2 = repository.Get(memberType.Id);
                repository.Delete(contentType2);

                bool exists = repository.Exists(memberType.Id);

                // Assert
                Assert.That(exists, Is.False);
            }
        }