CmisCmdlets.Test.Commands.NewCmisDocumentTests.CreatingDocumentWithLocalFileAndOtherFilename C# (CSharp) Method

CreatingDocumentWithLocalFileAndOtherFilename() private method

private CreatingDocumentWithLocalFileAndOtherFilename ( ) : void
return void
        public void CreatingDocumentWithLocalFileAndOtherFilename()
        {
            FileSystemHelper.CreateTempFile("__testContentFile.html", "foobar", Encoding.UTF8);
            CmisHelper.RegisterTempObject("/__otherFilename");
            var cmd = NewCmisDocumentCmd + " /__otherFilename -LocalFile __testContentFile.html";
            var res = Shell.Execute(cmd);
            var doc = res.First() as IDocument;
            Assert.That(doc, Is.Not.Null);
            Assert.That(doc.Paths, Contains.Item("/__otherFilename"));
            Assert.That("/__otherFilename", CmisHelper.Exists);
            Assert.That(doc, CmisHelper.HasContent(File.ReadAllBytes("__testContentFile.html"),
                                                   "text/html"));
        }