当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript assert.notEqual方法代码示例

本文整理汇总了TypeScript中chai.assert.notEqual方法的典型用法代码示例。如果您正苦于以下问题:TypeScript assert.notEqual方法的具体用法?TypeScript assert.notEqual怎么用?TypeScript assert.notEqual使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在chai.assert的用法示例。


在下文中一共展示了assert.notEqual方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: it

    it("applies correct protein colors wrt the corresponding prop", () => {
        const scriptGenerator = new PyMolScriptGenerator();
        const setColorStub = sinon.stub((scriptGenerator as any), "setColor");
        let script: string = "";


        props.proteinScheme = ProteinScheme.TRACE;
        props.proteinColor = ProteinColor.SECONDARY_STRUCTURE;
        script = scriptGenerator.generateScript("3pxe", "B", residues, props);

        assert.notEqual(script.indexOf("select (chain B) and (ss h);"), -1);
        assert.isTrue(setColorStub.withArgs("#FFA500").calledOnce,
            "Alpha helices should be colored with 0xFFA500 when SECONDARY_STRUCTURE is selected");
        assert.notEqual(script.indexOf("select (chain B) and (ss s);"), -1);
        assert.isTrue(setColorStub.withArgs("#0000FF").calledOnce,
            "Beta sheets should be colored with 0x0000FF when SECONDARY_STRUCTURE is selected");


        props.proteinScheme = ProteinScheme.CARTOON;
        props.proteinColor = ProteinColor.NC_RAINBOW;
        script = scriptGenerator.generateScript("3pxe", "B", residues, props);

        assert.notEqual(script.indexOf("spectrum count, rainbow_rev, sele;"), -1,
            "Chain should be colored with rainbow spectrum when NC_RAINBOW is selected");


        props.proteinScheme = ProteinScheme.SPACE_FILLING;
        props.proteinColor = ProteinColor.ATOM_TYPE;
        script = scriptGenerator.generateScript("3pxe", "B", residues, props);

        assert.notEqual(script.indexOf("util.cbaw sele;"), -1,
            "Chain should be colored with default element colors when ATOM_TYPE is selected");
    });
开发者ID:agarwalrounak,项目名称:cbioportal-frontend,代码行数:33,代码来源:PyMolScriptGenerator.spec.ts

示例2: it

  it('should have different ComponentType(s)', async () => {
    const componentType1: ComponentType = ComponentType.getFor(ComponentA)
	  const componentType2: ComponentType = ComponentType.getFor(ComponentB)
	  assert.equal(false, componentType1.equals(componentType2))
	  assert.equal(false, componentType2.equals(componentType1))
	  assert.notEqual(componentType1.getIndex(), componentType2.getIndex())
	  assert.notEqual(componentType1.getIndex(), ComponentType.getIndexFor(ComponentB))
    assert.notEqual(componentType2.getIndex(), ComponentType.getIndexFor(ComponentA))
  })
开发者ID:SoftwareSyndicate,项目名称:EiN,代码行数:9,代码来源:ComponentType.spec.ts

示例3: it

    it('should return an array of the correct fields', () => {
      const fields: string[] = schema.fieldNames();

      assert.equal(fields.length, 4);
      assert.notEqual(fields.indexOf('a'), -1);
      assert.notEqual(fields.indexOf('b'), -1);
      assert.notEqual(fields.indexOf('c'), -1);
      assert.notEqual(fields.indexOf('d'), -1);
    });
开发者ID:herrstucki,项目名称:compassql,代码行数:9,代码来源:schema.test.ts

示例4: it

 it("two lines", () => {
   const text = "hello  world!.";
   const availableWidth = measurer.measure(text).width - 2;
   const baseWrapper = new Wrapper().maxLines(2);
   const result = wrapper.wrap(text, measurer, availableWidth);
   const baseResult = baseWrapper.wrap(text, measurer, availableWidth);
   const baseDimensions = measurer.measure(baseResult.wrappedText);
   const dimensions = measurer.measure(result.wrappedText);
   assert.deepEqual(result.originalText, text, "original text has been set");
   assert.notEqual(result.wrappedText, text, "wrapped text is not the whole line");
   assert.notEqual(result.wrappedText, baseResult.wrappedText, "wrapped text looks better");
   assert.operator(dimensions.width, "<", baseDimensions.width, "occupies less width");
   assert.equal(dimensions.height, baseDimensions.height, "occupies same height");
   assert.operator(dimensions.width, "<=", availableWidth, "wrapped text fits in");
 });
开发者ID:palantir,项目名称:svg-typewriter,代码行数:15,代码来源:wrapperTests.ts

示例5: it

		it ('should not copy one object twice', () => {
			interface INameAge { name:string; age:number;
			}
			const propertyObject:INameAge = {name: 'Foo', age: 42};
			const origObject:{foo:INameAge, bar:INameAge } = {
				foo: propertyObject,
				bar: propertyObject
			};
			const copyObject:{foo:INameAge, bar:INameAge } =
								object.copy(origObject, true);

			chai.assert.notEqual(origObject.foo, copyObject.foo);
			chai.assert.notEqual(origObject.bar, copyObject.bar);
			chai.assert.equal(copyObject.foo, copyObject.bar);
		});
开发者ID:iskilber,项目名称:iska,代码行数:15,代码来源:Object.spec.ts

示例6: it

        it('should not overwrite existing gene information', () => {
            const mutations = [
                {
                    gene: {
                        hugoGeneSymbol: "AR",
                        entrezGeneId: -1
                    },
                    entrezGeneId: -1
                }
            ];

            updateMissingGeneInfo(mutations as Partial<Mutation>[], genesByHugoSymbol);

            assert.notEqual(mutations[0].entrezGeneId, genesByHugoSymbol["AR"].entrezGeneId);
            assert.notEqual(mutations[0].gene.entrezGeneId, genesByHugoSymbol["AR"].entrezGeneId);
        });
开发者ID:agarwalrounak,项目名称:cbioportal-frontend,代码行数:16,代码来源:MutationUtils.spec.ts

示例7: async

export const schemaLookup = async (data = dataSchemaLookup()) => {
  const schema = await Schema.lookup(data)
  assert.notEqual(schema.handle, undefined)
  assert.equal(schema.sourceId, data.sourceId)
  assert.ok(schema.schemaId)
  return schema
}
开发者ID:fabienpe,项目名称:indy-sdk,代码行数:7,代码来源:entities.ts


注:本文中的chai.assert.notEqual方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。