Пример #1
0
        public void ShouldWriteEnum()
        {
            // Enums
            EnumModel myEnumModel = new EnumModel("MyEnumModel");

            myEnumModel.EnumValues.Add(new EnumValue("Val1", 1));
            myEnumModel.EnumValues.Add(new EnumValue("Val2", 2));

            string result = myEnumModel.ToString() + Util.NewLine;

            string text = GetEnumText();

            Assert.Equal(result, text);
        }
Пример #2
0
 public SheetMapperSpecs()
 {
     _sheetData = new SheetBuilder()
                  .AddHeaders("Double", "Integer", "Boolean", "Enumeration", "String", "DateTime", "Decimal")
                  .AddRow(r => r
                          .AddCell(c => c.WithColumnIndex(0).WithRowIndex(1).WithValue(_doubleValue.ToString()).Build())
                          .AddCell(c => c.WithColumnIndex(1).WithRowIndex(1).WithValue(_intValue.ToString()).Build())
                          .AddCell(c => c.WithColumnIndex(2).WithRowIndex(1).WithValue(_boolValue.ToString()).Build())
                          .AddCell(c => c.WithColumnIndex(3).WithRowIndex(1).WithValue(_enumValue.ToString()).Build())
                          .AddCell(c => c.WithColumnIndex(4).WithRowIndex(1).WithValue(_stringValue.ToString()).Build())
                          .AddCell(c => c.WithColumnIndex(5).WithRowIndex(1).WithValue(_dateTimeValue.ToString("yyyy-MM-dd")).Build())
                          .AddCell(c => c.WithColumnIndex(6).WithRowIndex(1).WithValue(_decimalValue.ToString()).Build())
                          .Build(0))
                  .Build();
 }