示例#1
0
        public bool Equals(MockFile other)
        {
            if (string.CompareOrdinal(this.Filename, other.Filename) != 0)
            {
                return(false);
            }

            if (!this.LastModifiedTime.Equals(other.LastModifiedTime))
            {
                return(false);
            }

            byte[] dataBytes      = this.DataStream.GetBuffer();
            byte[] otherDataBytes = other.DataStream.GetBuffer();

            return(Util.ArraysEqual <byte>(dataBytes, otherDataBytes));
        }
示例#2
0
        public bool Equals(MockFileSystem other)
        {
            if (this._files.Count != other._files.Count)
            {
                return(false);
            }

            foreach (string filename in _files.Keys)
            {
                MockFile file      = _files[filename];
                MockFile otherFile = _files[filename];

                if (!file.Equals(otherFile))
                {
                    return(false);
                }
            }

            return(true);
        }
示例#3
0
 public void AddMockFile(MockFile file)
 {
     _files.Add(file.Filename, file);
 }