воскресенье, 17 июня 2018 г.

Assert.AreEqual(DockStyle.Fill, mainPanel.Dock);

Написал я вот такой тест:

        public void Test_LayoutControls_Horizontal() {
            ...
            splitLayout.Direction = ExpressApp.Layout.FlowDirection.Horizontal;

            SidePanelLayout layout = new SidePanelLayout ();
            Panel panel1 = new Panel();
            Panel panel2 = new Panel();
            layout.LayoutControls(splitLayout, new Item("1", panel1), new Item("2", panel2));
            SidePanelContainer mainPanel = layout.Container as SidePanelContainer;

            Assert.IsNotNull(mainPanel);
            Assert.AreEqual(DockStyle.Fill, mainPanel.Dock);

Angular6: стили в "Tour of Heroes"

Display a Heroes List at angular.io - второй шаг создания приложения.
Tour of Heroes at stackblitz.com - исходники и само приложение на этот шаг описания.

Авторы предлагают такую разметку для файла src/app/heroes/heroes.component.html:


<h2>My Heroes</h2>
<ul class="heroes">
<li *ngFor="let hero of heroes">
<a routerLink="/detail/{{hero.id}}">
<span class="badge">{{hero.id}}</span> {{hero.name}}
</a>
</li>
</ul>


<!--
Copyright 2017-2018 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
-->

и такие стили для файла src/app/heroes/heroes.component.css: