Пример #1
0
        public static Moder ReadModer(BinaryReader reader)
        {
            Moder RetData = new Moder();

            RetData.MLvl  = ReadString(reader);
            RetData.UId   = ReadString(reader);
            RetData.UName = ReadString(reader);
            return(RetData);
        }
Пример #2
0
        public void GetTopics_TopicFromDAL_CorrectMappingToTopicDTO()
        {
            // Arrange
            User user = new Moder(1, "test", "1");

            SecurityContext.SetUser(user);
            var topicService = GetTopicService();

            // Act
            var actualTopicDto = topicService.GetTopics(0).First();

            // Assert
            Assert.True(
                actualTopicDto.Topic_ID == 1 &&
                actualTopicDto.Topic_Name == "testN" &&
                actualTopicDto.Topic_Description == "testD"
                );
        }