Пример #1
0
        public void PostRequestSuccess()
        {
            //Arrange
            MockModerationDAL mockModerationDAL = new MockModerationDAL();
            Guid guid = Guid.NewGuid();

            var request = new Models.Request {
                RequestId = guid, RequestType = Models.RequestType.Upgrade_To_Chef, UserId = guid
            };

            Services.ModerationService moderationService = new Services.ModerationService(mockModerationDAL);

            //Act
            var result = moderationService.PostRequest(request);

            //Assert
            Assert.AreEqual(mockModerationDAL.requests.Count, 1);
        }
Пример #2
0
        public void PostReportSuccess()
        {
            //Arrange
            MockModerationDAL mockModerationDAL = new MockModerationDAL();
            Guid guid = Guid.NewGuid();

            var report = new Models.Report {
                PostId = guid, ReporterId = guid, ReportId = guid
            };

            Services.ModerationService moderationService = new Services.ModerationService(mockModerationDAL);

            //Act
            var result = moderationService.PostReport(report);

            //Assert
            Assert.AreEqual(mockModerationDAL.reports.Count, 1);
        }