예제 #1
0
        public void TableDefinition()
        {
            TableDefinition definition = new TableDefinition
            {
                Name = "returnedName"
            };

            var resource = new Mock <IOperationResource>();

            resource.Setup(c => c.GetTableDefinition())
            .Returns(definition);

            resourceFactoryMock.Setup(c => c.GetResource("conn1", OperationType.Any, "table1"))
            .Returns(resource.Object);

            var result = tableOperations.Definition("conn1", "table1");

            Assert.AreEqual(0, loggingService.LogCount);
            Assert.AreEqual(definition, result);
        }