public MockedFolderType(bool modificationDateUpdatable = true, MockBehavior behavior = MockBehavior.Strict) : base(behavior)
        {
            this.Id          = BaseTypeId.CmisFolder.GetCmisValue();
            this.BaseType    = this.Object;
            this.IsBaseType  = true;
            this.BaseTypeId  = BaseTypeId.CmisFolder;
            this.Description = "mocked C# folder type";
            this.DisplayName = "mocked folder type";
            var modificationDateDefinition = new MockedPropertyDateTimeDefinition()
            {
                Id           = PropertyIds.LastModificationDate,
                Updatability = modificationDateUpdatable ? Updatability.ReadWrite : Updatability.ReadOnly
            }.Object;

            this.PropertyDefinitions.Add(modificationDateDefinition);
        }
Example #2
0
        public MockedDocumentType(bool modificationDateUpdatable = true, MockBehavior behavior = MockBehavior.Strict) : base(behavior)
        {
            this.Id          = BaseTypeId.CmisDocument.GetCmisValue();
            this.BaseType    = this.Object;
            this.BaseTypeId  = BaseTypeId.CmisDocument;
            this.Description = "mocked C# document type";
            this.DisplayName = "mocked document type";
            var modificationDateDefinition = new MockedPropertyDateTimeDefinition()
            {
                Id           = PropertyIds.LastModificationDate,
                Updatability = modificationDateUpdatable ? Updatability.ReadWrite : Updatability.ReadOnly
            }.Object;

            this.PropertyDefinitions.Add(modificationDateDefinition);
            this.Setup(m => m.ContentStreamAllowed).Returns(ContentStreamAllowed.Allowed);
            this.Setup(m => m.GetChildren()).Returns(new MockedItemList <IObjectType>().Object);
        }