예제 #1
0
 /// <summary>
 /// Suppose for the moment we initialize factory from xml
 /// and factory which is instantiaited is a MemoryFactory.
 /// </summary>
 public DocumentsRepository()
 {
     _container = new DocumentsContainer(new MemoryDocuments());
 }
        public void AssumeTwoSameDocsCreated()
        {
            var mng = new MemoryDocuments();
            var container = new DocumentsContainer(mng);

            var result = container.Create("doc1", "user1");
            Assert.IsTrue(result.State == State.Created);
            Assert.IsTrue(result.Success);

            var result1 = container.Create("doc1", "user1");
            Assert.IsTrue(result1.State == State.Created);
            Assert.IsTrue(result1.Success);
        }