public void StringStream_GetAll_WhenPopulated_ReturnsCorrectNumberOfStrings()
        {
            const int                EXPECTED   = 15; // includes first empty string
            StringStream             stream     = CreateStringStream();
            Dictionary <int, string> allStrings = stream.GetAllStrings();

            Assert.AreEqual(EXPECTED, allStrings.Count);
        }
        public void StringStream_GetAll_WhenNoStrings_ReturnsCorrectNumberOfStrings()
        {
            const int EXPECTED = 1; // includes only the first valid empty string

            byte[]       contents = { 0 };
            StringStream stream   = new StringStream(contents, 0, 1);

            Dictionary <int, string> allStrings = stream.GetAllStrings();

            Assert.AreEqual(EXPECTED, allStrings.Count);
        }
 public StringStreamEntry(StringStream stream)
     : base(stream.Name)
 {
     this.Data = SimpleIndexEntry.Create <int, string>(stream.GetAllStrings());
 }
Example #4
0
 public Dictionary <int, string> GetAllStringsFromStream()
 {
     return(_stream.GetAllStrings());
 }