public void EnsureLegalCharactersThrowsExceptionIfFilenameContainsUtf8Character() {
            var session = new Mock<ISession>();
            session.SetupTypeSystem();
            var underTest = new SolverClass(session.Object, Mock.Of<IMetaDataStorage>());
            var exception = new CmisConstraintException();
            var fileInfo = Mock.Of<IFileSystemInfo>(f => f.Name == @"ä" && f.FullName == @"ä");

            Assert.Throws<InteractionNeededException>(() => underTest.CallEnsureThatLocalFileNameContainsLegalCharacters(fileInfo, exception));
        }
        public void EnsureLegalCharactersIfFilenameIsValid()
        {
            var session = new Mock <ISession>();

            session.SetupTypeSystem();
            var underTest = new SolverClass(session.Object, Mock.Of <IMetaDataStorage>());
            var exception = new CmisConstraintException();
            var fileInfo  = Mock.Of <IFileSystemInfo>(f => f.Name == "foo");

            underTest.CallEnsureThatLocalFileNameContainsLegalCharacters(fileInfo, exception);
        }
        public void EnsureLegalCharactersThrowsExceptionIfFilenameContainsUtf8Character()
        {
            var session = new Mock <ISession>();

            session.SetupTypeSystem();
            var underTest = new SolverClass(session.Object, Mock.Of <IMetaDataStorage>());
            var exception = new CmisConstraintException();
            var fileInfo  = Mock.Of <IFileSystemInfo>(f => f.Name == @"ä" && f.FullName == @"ä");

            Assert.Throws <InteractionNeededException>(() => underTest.CallEnsureThatLocalFileNameContainsLegalCharacters(fileInfo, exception));
        }
        public void EnsureLegalCharactersIfFilenameIsValid() {
            var session = new Mock<ISession>();
            session.SetupTypeSystem();
            var underTest = new SolverClass(session.Object, Mock.Of<IMetaDataStorage>());
            var exception = new CmisConstraintException();
            var fileInfo = Mock.Of<IFileSystemInfo>(f => f.Name == "foo");

            underTest.CallEnsureThatLocalFileNameContainsLegalCharacters(fileInfo, exception);
        }