Dart - Taunting Element Class

I am trying to create a unit test that requires us to falsify the Element class

So my code looks something like this:

import 'dart:html';

import 'package:unittest/unittest.dart';
import 'package:mock/mock.dart';


@proxy

class MockElement extends Mock implements Element{}

void main(){

  test("",(){
    MockView view = new MockView();  
    MockElement element = new MockElement();

When I run this, I get the following message

The dart: html built-in library is not available on stand-alone VMs. 'File: /// C: /Users/Schmidt/Documents/GitHub/PicasaWebAlbumDisplay/test/picasaphotopresentor_test.dart': error: line 1 pos 1: library handler could not import 'dart: html'; ^

I need to import html to define the Element class, so I'm stuck at this point.

Any ideas?

+3
source share
2 answers

html5lib. dart: html, .

, , - . . .

+1

factory. Element factory. . , factory Implemenation, . factory , . , Application, Test, factory , , , factory .

0

All Articles