public void GetExportsReturnsCorrectResultWhenImportDefinitionIsOliveOil()
        {
            // Fixture setup
            var importStub = new Mock<ImportDefinition>();
            importStub.SetupGet(id => id.ContractName).Returns(typeof(OliveOil).FullName);

            var sut = new OliveOilExportProvider();
            // Exercise system
            var result = sut.GetExports(importStub.Object);
            // Verify outcome
            Assert.True(result.Any(x => x.Value is OliveOil));
            // Teardown
        }
        public void GetExportsReturnsCorrectResultWhenImportDefinitionIsNotOliveOil()
        {
            // Fixture setup
            var importStub = new Mock<ImportDefinition>();
            importStub.SetupGet(id => id.ContractName).Returns("Foo");

            var sut = new OliveOilExportProvider();
            // Exercise system
            var result = sut.GetExports(importStub.Object);
            // Verify outcome
            Assert.Empty(result);
            // Teardown
        }
Beispiel #3
0
        public void GetExportsReturnsCorrectResultWhenImportDefinitionIsOliveOil()
        {
            // Fixture setup
            var importStub = new Mock <ImportDefinition>();

            importStub.SetupGet(id => id.ContractName).Returns(typeof(OliveOil).FullName);

            var sut = new OliveOilExportProvider();
            // Exercise system
            var result = sut.GetExports(importStub.Object);

            // Verify outcome
            Assert.True(result.Any(x => x.Value is OliveOil));
            // Teardown
        }
Beispiel #4
0
        public void GetExportsReturnsCorrectResultWhenImportDefinitionIsNotOliveOil()
        {
            // Fixture setup
            var importStub = new Mock <ImportDefinition>();

            importStub.SetupGet(id => id.ContractName).Returns("Foo");

            var sut = new OliveOilExportProvider();
            // Exercise system
            var result = sut.GetExports(importStub.Object);

            // Verify outcome
            Assert.Empty(result);
            // Teardown
        }