Пример #1
0
        public void WhenThereNotIsAGroupWithGivenName_ThenReturnsFalse()
        {
            var existGroupByGroupName = new ExistGroupByGroupName(connectionString);

            groupsCollection.Insert(new Group {
                Id = Identity.Random(12), Name = "Foo"
            });
            existGroupByGroupName.Execute("Bar").Should().Be.False();
        }
Пример #2
0
        public void WhenThereIsAGroupWithSameNameAndIdNull_ThenReturnsTrue()
        {
            var existGroupByGroupName = new ExistGroupByGroupName(connectionString);
            var entity = new Group {
                Id = Identity.Random(12), Name = "Foo"
            };

            groupsCollection.Insert(entity);
            existGroupByGroupName.Execute("Foo", null).Should().Be.True();
        }
Пример #3
0
        public void WhenThereIsAGroupWithSameNameAndDifferentId_ThenReturnsTrue()
        {
            var existGroupByGroupName = new ExistGroupByGroupName(connectionString);
            var entity = new Group {
                Id = Identity.Random(12), Name = "Foo"
            };

            groupsCollection.Insert(entity);
            existGroupByGroupName.Execute("Foo", new Identity("4de7e38617b6c420a45a84c4")).Should().Be.True();
        }