Esempio n. 1
0
        public void LoadResources_ValidateResourceFolder_Success()
        {
            //------------------Arrange---------------
            const string resourceDirectory = "Resources - ServerTests";

            var mockWriter    = new Mock <IWriter>();
            var mockDirectory = new Mock <IDirectory>();
            var mockResourceCatalogFactory = new Mock <IResourceCatalogFactory>();

            mockDirectory.Setup(o => o.Exists(It.IsAny <string>())).Returns(false);
            mockDirectory.Setup(o => o.CreateDirectory(It.IsAny <string>())).Verifiable();
            //------------------Act-------------------
            var loadResources = new LoadResources(resourceDirectory, mockWriter.Object, mockDirectory.Object, mockResourceCatalogFactory.Object);

            loadResources.ValidateResourceFolder();
            //------------------Assert----------------
            mockDirectory.Verify();
        }