Exemple #1
0
        public void ManyCellsExist()
        {
            var sheet = new Sheet();
            sheet.Put("A1", "First");
            sheet.Put("X27", "Second");

            Assert.That(sheet.Get("A1"), Is.EqualTo("First"));
            Assert.That(sheet.Get("X27"), Is.EqualTo("Second"));
        }
Exemple #2
0
 public void TextCellsAreStored()
 {
     var sheet = new Sheet();
     const string theCell = "A21";
     sheet.Put(theCell, "A string");
     Assert.That(sheet.Get(theCell), Is.EqualTo("A string"));
 }
Exemple #3
0
        public void NumericCellsAreIdentifiedAndStored()
        {
            var sheet = new Sheet();
            const string theCell = "B14";

            sheet.Put(theCell, "14");
            Assert.That(sheet.Get(theCell), Is.EqualTo("14"));

            sheet.Put(theCell, " 99 X");
            Assert.That(sheet.Get(theCell), Is.EqualTo(" 99 X"));

            sheet.Put(theCell, " 1234 ");
            Assert.That(sheet.Get(theCell), Is.EqualTo("1234"));

            sheet.Put(theCell, " ");
            Assert.That(sheet.Get(theCell), Is.EqualTo(" "));
        }
Exemple #4
0
        public void WeHaveAccessToCellLiteralValuesForEditing()
        {
            var sheet = new Sheet();
            const string theCell = "C21";

            sheet.Put(theCell, "Some string");
            Assert.That(sheet.GetLiteral(theCell), Is.EqualTo("Some string"));

            sheet.Put(theCell, " 1234 ");
            Assert.That(sheet.GetLiteral(theCell), Is.EqualTo(" 1234 "));

            sheet.Put(theCell, "=7");
            Assert.That(sheet.GetLiteral(theCell), Is.EqualTo("=7"));
        }