예제 #1
0
        public void Should_Throw_SecurityException_If_Non_Creator_Tries_To_Manage_Note()
        {
            //ARRANGE
            var note = new NoteEntity {
                CreatorId = 1
            };
            var userId = 235453;

            //ACT && ASSERT
            Assert.Throws <SecurityException>(() => SecurityAssertions.AssertThatIssuerIsAuthorizedToManageNote(note, userId));
        }
예제 #2
0
 private void AssertThatRequestCameFromCreator(NoteEntity note, int userId)
 {
     SecurityAssertions.AssertThatIssuerIsAuthorizedToManageNote(note, userId);
 }