Ejemplo n.º 1
0
        public void TestUserContactDto()
        {
            UserContactDto userContactDto1 = new UserContactDto("*****@*****.**", "Straße-des-1.", "1", "01111", "Ort 1", Country.DE, "Unternehmen 1", "http://www.1.de", "0123/456789", "0123/4567890", "0151/123456");
            UserContactDto userContactDto2 = new UserContactDto("*****@*****.**", "Straße-des-2.", "2", "02222", "Ort 2", Country.AT, "Unternehmen 2", "http://www.2.de", "0223/456789", "0223/4567890", "0251/123456");

            DtoAssert.TestEqualsAndGetHashCode(userContactDto1, userContactDto2);
        }
Ejemplo n.º 2
0
        public void TestUserDataDto()
        {
            UserDataDto userDataDto      = new UserDataDto(null, null, null, null);
            UserDataDto otherUserDataDto = new UserDataDto("Vorname", "Nachname", new DateTime(2000, 01, 01), "UserName");

            DtoAssert.TestEqualsAndGetHashCode(userDataDto, otherUserDataDto);
        }
Ejemplo n.º 3
0
        public void TestProposedUserDataDto()
        {
            ProposedUserDataDto userDataDto      = new ProposedUserDataDto(null, null, null, Salutation.Mister, null);
            ProposedUserDataDto otherUserDataDto = new ProposedUserDataDto("Vorname", "Nachname", "Titel", Salutation.Miss, new DateTime(1970, 07, 07));

            DtoAssert.TestEqualsAndGetHashCode(userDataDto, otherUserDataDto);
        }
Ejemplo n.º 4
0
        public void TestEqualsAndGetHashCodeFromDto()
        {
            // given:
            UserGroupDto firstDto  = new UserGroupDto("Keine", "der Name 1", -10);
            UserGroupDto secondDto = new UserGroupDto(null, "der name 2", -20);

            // when, then:
            DtoAssert.TestEqualsAndGetHashCode(firstDto, secondDto);
        }
Ejemplo n.º 5
0
        public void TestUserPermissionsDto()
        {
            UserPermissionDto userPermissionDto1 = new UserPermissionDto(new List <string>()
            {
                Roles.Administrator
            }, true);
            UserPermissionDto userPermissionDto2 = new UserPermissionDto(new List <string>()
            {
                Roles.Member
            }, false);

            DtoAssert.TestEqualsAndGetHashCode(userPermissionDto1, userPermissionDto2);
        }
Ejemplo n.º 6
0
        public void TestDto()
        {
            // given:
            User user      = new User();
            User otherUser = new User();

            // when:
            EntityCreatedDto entityCreatedDto      = new EntityCreatedDto(user, new DateTime(2017, 1, 1));
            EntityCreatedDto otherEntityCreatedDto = new EntityCreatedDto(otherUser, new DateTime(2017, 1, 11));

            // then:
            DtoAssert.TestEqualsAndGetHashCode(entityCreatedDto, otherEntityCreatedDto);
        }