예제 #1
0
        public void TestInsertAndDelete()
        {
            String timeStamp = DateTime.Now.ToString("yyyyMMddhhmmss");
            var    usergroup = new UserGroupDTOComponent
            {
                Name = "New User",
            };

            sut.InsertUserGroup(usergroup);
            var usergroupId       = usergroup.Id;
            var insertedUserGroup = sut.GetUserGroupById(usergroupId);

            sut.DeleteUserGroup(usergroup);
            var deletedUserAccount = sut.GetUserGroupById(usergroupId);

            Assert.AreEqual(expected: usergroup.Id, actual: insertedUserGroup.Id);
            Assert.AreEqual(expected: usergroup.Name, actual: insertedUserGroup.Name);

            Assert.IsNull(deletedUserAccount);
        }