Esempio n. 1
0
        public void IsFalse()
        {
            ExceptionAssert.Throws(debugAssertException, () => { Assumes.IsFalse(true); }).WithMessage("Assumption failed.", ExceptionMessageComparison.StartsWith);
            ExceptionAssert.Throws(debugAssertException, () => { Assumes.IsFalse(true, "test."); }).WithMessage("Assumption failed. test.", ExceptionMessageComparison.StartsWith);

            Assumes.IsFalse(false);
            Assumes.IsFalse(false, "test");
        }
Esempio n. 2
0
        public void IsFalse()
        {
            ExceptionAssert.Throws <AssumptionException>(() => { Assumes.IsFalse(true); }).WithMessage("Assumption failed.");
            ExceptionAssert.Throws <AssumptionException>(() => { Assumes.IsFalse(true, "test."); }).WithMessage("Assumption failed. test.");

            Assumes.IsFalse(false);
            Assumes.IsFalse(false, "test");
        }
        public CachingResult <Type> EndGeneration()
        {
            Assumes.IsTrue(this._isGenerationStarted);
            Assumes.IsFalse(this._isGenerationCompleted);
            CachingResult result = CachingResult.SucceededResult;

            result = result.MergeResult(this.GenerateGetCatalogMetadata());
            result = result.MergeResult(this.GenerateGetCatalogIndex());
            Type stubType = this._stubBuilder.CreateType();

            this._partsDefinitionBuilder.CreateType();
            this._exportsDefinitionBuilder.CreateType();
            this._importsDefinitionBuilder.CreateType();

            this._isGenerationCompleted = true;
            return(result.ToResult <Type>(stubType));
        }
        public void BeginGeneration()
        {
            Assumes.IsFalse(this._isGenerationStarted);
            Assumes.IsFalse(this._isGenerationCompleted);
            this._isGenerationStarted = true;

            this.GenerateCachingStub();
            this.GenerateTables();

            Assumes.NotNull(this._stubBuilder);
            Assumes.NotNull(this._createPartDefinitionMethod);
            Assumes.NotNull(this._createExportDefinitionMethod);
            Assumes.NotNull(this._createImportDefinitionMethod);

            Assumes.NotNull(this._partsDefinitionBuilder);
            Assumes.NotNull(this._exportsDefinitionBuilder);
            Assumes.NotNull(this._importsDefinitionBuilder);
        }