Beispiel #1
0
        public void SetLength_Not_Supported()
        {
            ActionStream actionStream = new ActionStream(new StreamActions());

            Assert.Throws <NotSupportedException>(() =>
            {
                actionStream.SetLength(1);
            });
        }
Beispiel #2
0
        public void Set_Length()
        {
            long         expectedLength = 0;
            ActionStream actionStream   = new ActionStream(new StreamActions
            {
                SetLength = length => expectedLength = length
            });

            actionStream.SetLength(10);

            Assert.Equal(10, expectedLength);
        }