Ejemplo n.º 1
0
        public void CreateListBiz_ListIdWebId_CreatesListBizInstance()
        {
            // Arrange
            var listId        = Guid.Empty;
            var webId         = Guid.Empty;
            var listBizFields = new ListItemCollection();

            listBizFields = null;
            ShimListBiz.CreateNewMappingGuidGuidGuidListItemCollection =
                (site, list, web, fieldsCollection) =>
            {
                listId        = list;
                webId         = web;
                listBizFields = fieldsCollection;
                return(new ShimListBiz().Instance);
            };
            var fields = new ListItemCollection();

            // Act
            var result = reportBiz.CreateListBiz(DummyGuid, DummyGuid, fields);

            // Assert
            result.ShouldSatisfyAllConditions(
                () => result.ShouldNotBeNull(),
                () => listId.ShouldBe(DummyGuid),
                () => webId.ShouldBe(DummyGuid),
                () => listBizFields.ShouldNotBeNull(),
                () => listBizFields.ShouldBe(fields));
        }