{"size": 1564, "ext": "js", "max_stars_repo_path": "test/thrift/io/header.test.js", "max_stars_repo_name": "peaksnail/pinpoint-node-agent", "max_stars_repo_stars_event_min_datetime": "2016-08-17T01:12:28.000Z", "max_stars_repo_stars_event_max_datetime": "2021-08-13T09:54:11.000Z", "max_issues_repo_path": "test/thrift/io/header.test.js", "max_issues_repo_name": "peaksnail/pinpoint-node-agent", "max_issues_repo_issues_event_min_datetime": "2016-08-20T15:41:54.000Z", "max_issues_repo_issues_event_max_datetime": "2020-01-27T05:54:00.000Z", "max_forks_repo_path": "test/thrift/io/header.test.js", "max_forks_repo_name": "peaksnail/pinpoint-node-agent", "max_forks_repo_forks_event_min_datetime": "2016-09-02T16:04:40.000Z", "max_forks_repo_forks_event_max_datetime": "2020-07-15T04:07:35.000Z"}
{"max_stars_count": 82, "max_issues_count": 36, "max_forks_count": 32, "avg_line_length": 29.5094339623, "max_line_length": 75, "alphanum_fraction": 0.6368286445}
/*
 * Copyright 2017 dmb.star-net.cn
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

//header.test.js
//

'use strict';
var expect = require('chai').expect;
var Header= require('../../../agent/thrift/io/header.js').Header;

describe(__filename, function () {

    /* jshint expr: true */

    var header = new Header(-17, 16, 40);
    it('get header signature', function () {
        expect(header.getSignature()).to.be.equal(-17);
    });
    it('get header version', function () {
        expect(header.getVersion()).to.be.equal(16);
    });
    it('get header type', function () {
        expect(header.getType()).to.be.equal(40);
    });

    it('set header signature', function () {
        header.setSignature(34);
        expect(header.getSignature()).to.be.equal(34);
    });
    it('set header version', function () {
        header.setVersion(4);
        expect(header.getVersion()).to.be.equal(4);
    });
    it('set header type', function () {
        header.setType(56);
        expect(header.getType()).to.be.equal(56);
    });
});

