Example #1
0
        public void Given_Create_When_DataIsProvided_Then_ShouldCreateEntity()
        {
            // act
            var result = ContentHolder.Create(name, holderEmail, originId);

            // assert
            Assert.NotNull(result);
        }
Example #2
0
        public void Given_AddContent_When_ContentIsProvidedAndEmailIsValid_Then_ShouldReturnOkResult()
        {
            // arrange
            var content       = Content.Create("test", new List <File>());
            var contentHolder = ContentHolder.Create(name, holderEmail, originId);
            // act

            var result = contentHolder.AddContent(holderEmail, content);

            // assert
            Assert.True(result.IsSuccess);
        }
Example #3
0
        public void Given_AddContent_When_ContentIsProvidedAndEmailIsNotForCurrentContent_Then_ShouldReturnFailedResult()
        {
            // arrange
            var content       = Content.Create("test", new List <File>());
            var contentHolder = ContentHolder.Create(name, holderEmail, originId);
            // act

            var result = contentHolder.AddContent("noemail", content);

            // assert
            Assert.True(result.IsFailure);
        }