Esempio n. 1
0
        public void EntityNameIsExtractedFromClass()
        {
            //Arrange
            var item = new Customer();

            //Act
            var result = TargetAnalyser.Analyse(item);

            //Assert
            result.Entity.Should().Be("Customer");
        }
Esempio n. 2
0
        public void EntityNamesCanBeOverridden()
        {
            //Arrange
            var item = new Customer2();

            //Act
            var result = TargetAnalyser.Analyse(item);

            //Assert
            var output = new Output();

            output.FormatTable(result.Fields.Select(f => new { f.Entity, Field = f.Field.Describe(), Type = f.Type.Name }));
            output.Report.Verify();
        }
Esempio n. 3
0
        public void EntityFieldsAreExtractedFromClass()
        {
            //Arrange
            var item = new Customer();

            //Act
            var result = TargetAnalyser.Analyse(item);

            //Assert
            var output = new Output();

            output.FormatTable(result.Fields.Select(f => new { f.Entity, Field = f.Field.Describe(), Type = f.Type.Name }));
            output.Report.Verify();
        }