Skip to content

Commit

Permalink
No-op Merge: FlexBridgeAlpha->FlexBridgeBeta
Browse files Browse the repository at this point in the history
  • Loading branch information
regnrand committed Nov 27, 2013
2 parents 85f9df7 + 58a2879 commit 07c1cae
Show file tree
Hide file tree
Showing 49 changed files with 1,511 additions and 259 deletions.
16 changes: 13 additions & 3 deletions GetAndBuildThis.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
setlocal
call UpdateDependencies.bat

call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
IF "%1"=="" (
set BUILD_CONFIG="Debug"
) ELSE (
set BUILD_CONFIG=%1
)

IF "%2"=="" (
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
SET HaveCalledvcvarsall=True
)

hg pull -u --rebase
msbuild "Chorus VS2010.sln" /verbosity:quiet /maxcpucount
call UpdateDependencies.bat %BUILD_CONFIG% %HaveCalledvcvarsall%
msbuild "Chorus VS2010.sln" /verbosity:quiet /maxcpucount /p:Configuration=%BUILD_CONFIG%
45 changes: 22 additions & 23 deletions UpdateDependencies.bat
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
REM Since Palaso libraries change frequently, you will likely need to get that project
REM and be able to build it. Run this script to build and copy those libraries.
REM This script assumes that the Palaso project directory is on the same level as this one.
REM It copies the needed libraries both into the lib folder and the debug folder.

pushd ..\palaso
call GetAndBuildThis.bat
REM Since Palaso libraries change frequently, you will likely need to
REM get that project and be able to build it, then run this script.
REM This script assumes that the libraries project are on the same level as this project.
REM It copies the needed libraries both into the lib folder and the debug/release folder.

IF "%1"=="" (
set BUILD_CONFIG="Debug"
) ELSE (
set BUILD_CONFIG=%1
)

pushd .
cd ..\palaso
call GetAndBuildThis.bat %BUILD_CONFIG% %2
popd

copy /Y ..\palaso\output\debug\palaso.dll lib\debug\
copy /Y ..\palaso\output\debug\palaso.xml lib\debug\
copy /Y ..\palaso\output\debug\palaso.pdb lib\debug\

copy /Y ..\palaso\output\debug\Palaso.Lift.dll lib\debug\
copy /Y ..\palaso\output\debug\Palaso.Lift.xml lib\debug\
copy /Y ..\palaso\output\debug\Palaso.Lift.pdb lib\debug\
copy /Y ..\palaso\output\%BUILD_CONFIG%\palaso.dll lib\%BUILD_CONFIG%
copy /Y ..\palaso\output\%BUILD_CONFIG%\palaso.pdb lib\%BUILD_CONFIG%

copy /Y ..\palaso\output\debug\palasouiwindowsforms.dll lib\debug
copy /Y ..\palaso\output\debug\palasouiwindowsforms.xml lib\debug
copy /Y ..\palaso\output\debug\palasouiwindowsforms.pdb lib\debug
copy /Y ..\palaso\output\%BUILD_CONFIG%\Palaso.Lift.dll lib\%BUILD_CONFIG%
copy /Y ..\palaso\output\%BUILD_CONFIG%\Palaso.Lift.pdb lib\%BUILD_CONFIG%

copy /Y ..\palaso\output\%BUILD_CONFIG%\palasouiwindowsforms.dll lib\%BUILD_CONFIG%
copy /Y ..\palaso\output\%BUILD_CONFIG%\palasouiwindowsforms.pdb lib\%BUILD_CONFIG%

copy /Y ..\palaso\output\debug\palaso.testutilities.dll lib\debug
copy /Y ..\palaso\output\debug\palaso.testutilities.xml lib\debug
copy /Y ..\palaso\output\debug\palaso.testutilities.pdb debug

copy /Y ..\palaso\output\debug\palaso.* output\debug
copy /Y ..\palaso\output\debug\palaso.testutilities.* output\debug
copy /Y ..\palaso\output\debug\palasouiwindowsforms.* output\debug
copy /Y ..\palaso\output\%BUILD_CONFIG%\palaso.testutilities.dll lib\%BUILD_CONFIG%
copy /Y ..\palaso\output\%BUILD_CONFIG%\palaso.testutilities.pdb lib\%BUILD_CONFIG%

pause
24 changes: 24 additions & 0 deletions UpdateDependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

# Since Palaso libraries change frequently, you will likely need to
# get that project and be able to build it, then run this script.
# This script assumes that the libraries project are on the same level as this project.
# It copies the needed libraries both into the lib folder and the ${BUILD_CONFIG}Mono folder.

# pushd Palaso
# call GetAndBuildThis.bat
# popd

if [ "$1" == "" ]
then
BUILD_CONFIG=Debug
else
BUILD_CONFIG=$1
fi


cp ../palaso/output/${BUILD_CONFIG}Mono/Palaso.* lib/${BUILD_CONFIG}Mono
cp ../palaso/output/${BUILD_CONFIG}Mono/PalasoUIWindowsForms.* lib/${BUILD_CONFIG}Mono

cp ../palaso/output/${BUILD_CONFIG}Mono/Palaso.* output/${BUILD_CONFIG}Mono
cp ../palaso/output/${BUILD_CONFIG}Mono/PalasoUIWindowsForms.* output/${BUILD_CONFIG}Mono
24 changes: 12 additions & 12 deletions build/Download.targets
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
<Target Name="DownloadMonoAssemblies" Condition="'$(OS)'!='Windows_NT'">
<MakeDir Directories="$(MSBuildProjectDirectory)/../../Download"/>
<MakeDir Directories="$(MSBuildProjectDirectory)/../../Download/DefaultMono"/>
<!-- bt280 is the palaso-Precise64-FlexBridgeAlpha Continuous build -->
<Message Text="Downloading latest successful artifacts from the palaso-Precise64-FlexBridgeAlpha Continuous build."/>
<DownloadFile Address="http://build.palaso.org/guestAuth/repository/download/bt280/.lastSuccessful/Palaso.dll" LocalFilename="$(MSBuildProjectDirectory)/../../Download/DefaultMono/Palaso.dll"/>
<DownloadFile Address="http://build.palaso.org/guestAuth/repository/download/bt280/.lastSuccessful/Palaso.Lift.dll" LocalFilename="$(MSBuildProjectDirectory)/../../Download/DefaultMono/Palaso.Lift.dll"/>
<DownloadFile Address="http://build.palaso.org/guestAuth/repository/download/bt280/.lastSuccessful/Palaso.TestUtilities.dll" LocalFilename="$(MSBuildProjectDirectory)/../../Download/DefaultMono/Palaso.TestUtilities.dll"/>
<DownloadFile Address="http://build.palaso.org/guestAuth/repository/download/bt280/.lastSuccessful/PalasoUIWindowsForms.dll" LocalFilename="$(MSBuildProjectDirectory)/../../Download/DefaultMono/PalasoUIWindowsForms.dll"/>
<!-- bt284 is the palaso-Precise64-FlexBridgeBeta Continuous build -->
<Message Text="Downloading latest successful artifacts from the palaso-Precise64-FlexBridgeBeta Continuous build."/>
<DownloadFile Address="http://build.palaso.org/guestAuth/repository/download/bt284/.lastSuccessful/Palaso.dll" LocalFilename="$(MSBuildProjectDirectory)/../../Download/DefaultMono/Palaso.dll"/>
<DownloadFile Address="http://build.palaso.org/guestAuth/repository/download/bt284/.lastSuccessful/Palaso.Lift.dll" LocalFilename="$(MSBuildProjectDirectory)/../../Download/DefaultMono/Palaso.Lift.dll"/>
<DownloadFile Address="http://build.palaso.org/guestAuth/repository/download/bt284/.lastSuccessful/Palaso.TestUtilities.dll" LocalFilename="$(MSBuildProjectDirectory)/../../Download/DefaultMono/Palaso.TestUtilities.dll"/>
<DownloadFile Address="http://build.palaso.org/guestAuth/repository/download/bt284/.lastSuccessful/PalasoUIWindowsForms.dll" LocalFilename="$(MSBuildProjectDirectory)/../../Download/DefaultMono/PalasoUIWindowsForms.dll"/>
<!-- split into two stages so that if the net connection fails, you still have the old files -->
<Message Text="Copying latest successful artifacts from Palaso DefaultMono build."/>
<Copy SourceFiles="@(DownloadedMono)" DestinationFolder="$(MSBuildProjectDirectory)/../../lib/DebugMono"
Expand All @@ -58,12 +58,12 @@
<DownloadFile Address="http://build.palaso.org/guestAuth/repository/download/bt14/.lastSuccessful/icudt40.dll" LocalFilename="$(MSBuildProjectDirectory)/../../Download/DotNet/icudt40.dll"/>
<DownloadFile Address="http://build.palaso.org/guestAuth/repository/download/bt14/.lastSuccessful/icuin40.dll" LocalFilename="$(MSBuildProjectDirectory)/../../Download/DotNet/icuin40.dll"/>
<DownloadFile Address="http://build.palaso.org/guestAuth/repository/download/bt14/.lastSuccessful/icuuc40.dll" LocalFilename="$(MSBuildProjectDirectory)/../../Download/DotNet/icuuc40.dll"/>
<!-- bt275 is the palaso-win32-FlexBridgeAlpha Continuous build. -->
<Message Text="Downloading latest successful artifacts from the palaso-win32-FlexBridgeAlpha Continuous build."/>
<DownloadFile Address="http://build.palaso.org/guestAuth/repository/download/bt275/.lastSuccessful/Palaso.dll" LocalFilename="$(MSBuildProjectDirectory)/../../Download/DotNet/Palaso.dll"/>
<DownloadFile Address="http://build.palaso.org/guestAuth/repository/download/bt275/.lastSuccessful/Palaso.Lift.dll" LocalFilename="$(MSBuildProjectDirectory)/../../Download/DotNet/Palaso.Lift.dll"/>
<DownloadFile Address="http://build.palaso.org/guestAuth/repository/download/bt275/.lastSuccessful/Palaso.TestUtilities.dll" LocalFilename="$(MSBuildProjectDirectory)/../../Download/DotNet/Palaso.TestUtilities.dll"/>
<DownloadFile Address="http://build.palaso.org/guestAuth/repository/download/bt275/.lastSuccessful/PalasoUIWindowsForms.dll" LocalFilename="$(MSBuildProjectDirectory)/../../Download/DotNet/PalasoUIWindowsForms.dll"/>
<!-- bt273 is the palaso-win32-FlexBridgeBeta Continuous build. -->
<Message Text="Downloading latest successful artifacts from the palaso-win32-FlexBridgeBeta Continuous build."/>
<DownloadFile Address="http://build.palaso.org/guestAuth/repository/download/bt273/.lastSuccessful/Palaso.dll" LocalFilename="$(MSBuildProjectDirectory)/../../Download/DotNet/Palaso.dll"/>
<DownloadFile Address="http://build.palaso.org/guestAuth/repository/download/bt273/.lastSuccessful/Palaso.Lift.dll" LocalFilename="$(MSBuildProjectDirectory)/../../Download/DotNet/Palaso.Lift.dll"/>
<DownloadFile Address="http://build.palaso.org/guestAuth/repository/download/bt273/.lastSuccessful/Palaso.TestUtilities.dll" LocalFilename="$(MSBuildProjectDirectory)/../../Download/DotNet/Palaso.TestUtilities.dll"/>
<DownloadFile Address="http://build.palaso.org/guestAuth/repository/download/bt273/.lastSuccessful/PalasoUIWindowsForms.dll" LocalFilename="$(MSBuildProjectDirectory)/../../Download/DotNet/PalasoUIWindowsForms.dll"/>
<!-- split into two stages so that if the net connection fails, you still have the old files -->
<Copy SourceFiles="@(DownloadedDotNet)" DestinationFolder="$(MSBuildProjectDirectory)/../../lib/Debug"
SkipUnchangedFiles="true"/>
Expand Down
11 changes: 10 additions & 1 deletion build/TestBuild.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
#!/bin/bash
xbuild "/target:Clean;Compile" /property:Configuration=DebugMono /property:RootDir=.. /property:BUILD_NUMBER="1.5.1.abcd" build.mono.proj

if "$1"==""
then
BUILD_CONFIG=Debug
else
BUILD_CONFIG=$1
fi


xbuild "/target:Clean;Compile" /property:Configuration=${BUILD_CONFIG}Mono /property:RootDir=.. /property:BUILD_NUMBER="1.5.1.abcd" build.mono.proj
11 changes: 5 additions & 6 deletions build/build.mono.proj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<UsingTask TaskName="Archive" AssemblyFile="$(RootDir)/build/Palaso.BuildTasks.dll" />
<UsingTask TaskName="Split" AssemblyFile="$(RootDir)/build/Palaso.BuildTasks.dll" />
<UsingTask TaskName="FileUpdate" AssemblyFile="$(RootDir)/build/Palaso.BuildTasks.dll" />
<UsingTask TaskName="DNZip" AssemblyFile="$(RootDir)/build/MSBuild.ExtensionPack.dll" />
<UsingTask TaskName="NUnitTeamCity" AssemblyFile="$(agent_home_dir)/plugins/dotnetPlugin/bin/JetBrains.BuildServer.MSBuildLoggers.dll" />

<PropertyGroup>
Expand Down Expand Up @@ -51,14 +50,14 @@
<Target Name="UnzipMercurial">
<!-- Remember, Unix/Linux commands return 0 for success ("true") -->
<Exec Command="/usr/bin/test `arch` = x86_64" ContinueOnError="true" IgnoreExitCode="true">
<Output TaskParameter="ExitCode" PropertyName="Not64BitCpu"/>
<Output TaskParameter="ExitCode" PropertyName="ZeroIf64BitCpu"/>
</Exec>
<Exec Command="/usr/bin/test `arch` = i686" ContinueOnError="true" IgnoreExitCode="true">
<Output TaskParameter="ExitCode" PropertyName="Not32BitCpu"/>
<Output TaskParameter="ExitCode" PropertyName="ZeroIf32BitCpu"/>
</Exec>
<!-- Extract a zip file-->
<DNZip Condition="'$(Not64BitCpu)'=='0'" TaskAction="Extract" ExtractPath="$(RootDir)" ZipFileName="$(RootDir)/lib/common/Mercurial-x86_64.zip"/>
<DNZip Condition="'$(Not32BitCpu)'=='0'" TaskAction="Extract" ExtractPath="$(RootDir)" ZipFileName="$(RootDir)/lib/common/Mercurial-i686.zip"/>
<!-- Extract the appropriate zip file. -->
<Exec Condition="'$(ZeroIf64BitCpu)'=='0'" Command="/usr/bin/unzip -uq $(RootDir)/lib/common/Mercurial-x86_64.zip -d $(RootDir)" />
<Exec Condition="'$(ZeroIf32BitCpu)'=='0'" Command="/usr/bin/unzip -uq $(RootDir)/lib/common/Mercurial-i686.zip -d $(RootDir)" />
<!-- Zip doesn't seem to retain the permission bits we need. -->
<Exec Command="/bin/chmod +x $(RootDir)/Mercurial/hg*" ContinueOnError="true"/>
</Target>
Expand Down
13 changes: 13 additions & 0 deletions build/build.win.proj
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,19 @@

</Target>

<Target Name="ChorusHubInstaller" DependsOnTargets="CleanInstaller; VersionNumbers; Test ">

<!-- set the version number in the installer configuration program. Perhaps there's a way to just send in the variables rather than this brute-force
changing of the script, but I haven't figured that out. -->

<FileUpdate File="$(RootDir)\src\Installer\ChorusHub.wxs" Regex='Property_ProductVersion = ".*"'
ReplacementText ="Property_ProductVersion = &quot;$(Version)&quot;" />
<Message Text="Making Chorus Hub installer with version: $(Version)" Importance="high" />

<MSBuild Projects="$(RootDir)\src\Installer\ChorusHub.wixproj"/>

</Target>


<Target Name="MakeWixForDistFiles">
<MakeWixForDirTree
Expand Down
43 changes: 34 additions & 9 deletions src/Chorus.Tests/ChorusSystemTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Threading;
Expand All @@ -25,7 +26,7 @@ public void Setup()
{
_folder = new TemporaryFolder("ChorusSystemTests");
_targetFile1 = new TempFileFromFolder(_folder, "one.txt", "just a pretend file");
_existingNotesFile = new TempFileFromFolder(_folder, "one.txt" + AnnotationRepository.FileExtension,
_existingNotesFile = new TempFileFromFolder(_folder, "one.txt." + AnnotationRepository.FileExtension,
@"<notes version='0'>
<annotation ref='somwhere://foo?id=x' class='mergeConflict'>
<message guid='123' author='merger' status='open' date='2009-07-18T23:53:04Z'>
Expand Down Expand Up @@ -72,6 +73,29 @@ public void CanShowNotesBar()
ShowWindowWithControlThenClose(view);
}

[Test]
public void CanMakeNotesBarWithOtherFiles()
{
var otherFile = new TempFileFromFolder(_folder, "two.txt", "just a pretend file");
var otherNotesFile = new TempFileFromFolder(_folder, "two.txt." + AnnotationRepository.FileExtension,
@"<notes version='0'>
<annotation ref='somwhere://foo?guid=x' class='mergeConflict'>
<message guid='123' author='merger' status='open' date='2009-07-18T23:53:04Z'>
some description of the conflict
</message>
</annotation>
</notes>");
var mapping = new NotesToRecordMapping();
mapping.FunctionToGoFromObjectToItsId = obj => "x"; // means it looks for "x" as the id in the one.txt urls and the guid in the two.txt urls.
var view = _system.WinForms.CreateNotesBar(_targetFile1.Path, (new List<String> {otherFile.Path}), "guid", mapping, _progress);
view._model.SetTargetObject("myobj");
var annotations = view._model.GetAnnotationsToShow().ToList();
Assert.That(annotations, Has.Count.EqualTo(2), "should have obtained annotations from both files");
ShowWindowWithControlThenClose(view);
otherFile.Dispose();
otherNotesFile.Dispose();
}

/// <summary>
/// Regression test. Once, the autofac container was generating new ProjectFolderConfiguration's with each call
/// </summary>
Expand Down Expand Up @@ -109,15 +133,16 @@ static void Application_Idle(object sender, EventArgs e)
[Platform(Exclude="Mono")] //running CreateNotesBrowser twice in a mono test session causes a crash
public void GetNotesBarAndBrowser_MakeNewAnnotationWithBar_BrowserSeesIt()
{
NotesToRecordMapping mapping = NotesToRecordMapping.SimpleForTest();
var bar = _system.WinForms.CreateNotesBar(_targetFile1.Path, mapping, _progress);
var browser = _system.WinForms.CreateNotesBrowser();
Assert.AreEqual(0, browser._notesInProjectModel.GetMessages().Count());
NotesToRecordMapping mapping = NotesToRecordMapping.SimpleForTest();
var bar = _system.WinForms.CreateNotesBar(_targetFile1.Path, mapping, _progress);
var browser = _system.WinForms.CreateNotesBrowser();
Assert.AreEqual(1, browser._notesInProjectModel.GetMessages().Count());

bar.SetTargetObject(this);
var a = bar._model.CreateAnnotation();
a.AddMessage("test", "open", "hello");
Assert.AreEqual(1, browser._notesInProjectModel.GetMessages().Count());
bar.SetTargetObject(this);
var a = bar._model.CreateAnnotation();
bar._model.AddAnnotation(a);
a.AddMessage("test", "open", "hello");
Assert.AreEqual(2, browser._notesInProjectModel.GetMessages().Count());
}

}
Expand Down
58 changes: 54 additions & 4 deletions src/Chorus.Tests/UI/notes/NotesBarModelTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Chorus.notes;
using System.Collections.ObjectModel;
using Chorus.notes;
using Chorus.UI.Notes.Bar;
using System.Linq;
using NUnit.Framework;
Expand All @@ -9,12 +10,22 @@ namespace Chorus.Tests.notes
public class NotesBarModelTests
{
[Test]
public void CreateAnnotation_CreatesNewAnotationUsingIdOfCurrentAnnotatedObject()
public void CreateOrphanAnnotation_DoesNotAddToRepository()
{
var repo = AnnotationRepository.FromString("id", "<notes version='0'/>");
var model = new NotesBarModel(repo);
model.SetTargetObject("foo3");
model.CreateAnnotation();
Assert.AreEqual(0, repo.GetAllAnnotations().Count());
}

[Test]
public void CreateAnnotation_CreatesNewAnotationUsingIdOfCurrentAnnotatedObject()
{
var repo = AnnotationRepository.FromString("id", "<notes version='0'/>");
var model = new NotesBarModel(repo);
model.SetTargetObject("foo3");
model.AddAnnotation(model.CreateAnnotation());
Assert.AreEqual(1, repo.GetAllAnnotations().Count());
Assert.IsTrue(repo.GetAllAnnotations().First().RefStillEscaped.Contains("id="+"foo3"));
}
Expand All @@ -28,7 +39,7 @@ public void CreateAnnotation_HaveCustomUrlGenerator_UseIt()
mapping.FunctionToGetCurrentUrlForNewNotes = (unusedTarget, escapedId) => "foobar:" + escapedId;
var model = new NotesBarModel(repo, mapping);
model.SetTargetObject("foo3");
model.CreateAnnotation();
model.AddAnnotation(model.CreateAnnotation());
Assert.AreEqual(1, repo.GetAllAnnotations().Count());
Assert.AreEqual("foobar:xfoo3x", repo.GetAllAnnotations().First().RefStillEscaped);
}
Expand All @@ -44,9 +55,48 @@ public void CreateAnnotation_KeyHasDangerousCharacters_ResultingUrlHasThemEscape
//mapping.UrlGenerator = (target,key)=> string.Format("lift://object?type=entry&amp;id={0}&amp;type=test", key);
var model = new NotesBarModel(repo, mapping);
model.SetTargetObject("two'<three&four");
model.CreateAnnotation();
model.AddAnnotation(model.CreateAnnotation());
Assert.IsTrue(repo.GetAllAnnotations().First().RefUnEscaped.Contains("two'<three&four"));
}

[Test]
public void GetAnnotationsToShow_ShowsAnnotationsFromFunctionToGoFromObjectToItsId()
{
var repo = AnnotationRepository.FromString("guid",
@"<notes version='0'>
<annotation guid='123' ref='lift://FTeam.lift?type=entry&amp;guid=abc'><message guid='234'>hello</message></annotation>
<annotation guid='345' ref='lift://FTeam.lift?type=entry&amp;guid=def'><message guid='234'>hello</message></annotation>
</notes>");
var mapping = new NotesToRecordMapping();
mapping.FunctionToGoFromObjectToItsId = (x) => "def";
var model = new NotesBarModel(repo, mapping);
model.SetTargetObject("xyz");
var annotationsToShow = model.GetAnnotationsToShow().ToList();
Assert.That(annotationsToShow, Has.Count.EqualTo(1));
Assert.That(annotationsToShow[0].Guid, Is.EqualTo("345"));
}

[Test]
public void GetAnnotationsToShow_ShowsAnnotationsFromFunctionToGoFromObjectToAdditionalIds()
{
var repo = AnnotationRepository.FromString("guid",
@"<notes version='0'>
<annotation guid='123' ref='lift://FTeam.lift?type=entry&amp;guid=abc'><message guid='234'>hello</message></annotation>
<annotation guid='345' ref='lift://FTeam.lift?type=entry&amp;guid=def'><message guid='234'>hello</message></annotation>
<annotation guid='567' ref='lift://FTeam.lift?type=entry&amp;guid=ghi'><message guid='234'>hello</message></annotation>
<annotation guid='678' ref='lift://FTeam.lift?type=entry&amp;guid=klm'><message guid='234'>hello</message></annotation>
</notes>");
var mapping = new NotesToRecordMapping();
mapping.FunctionToGoFromObjectToItsId = (x) => "def";
mapping.FunctionToGoFromObjectToAdditionalIds = (x) => new [] {"ghi", "abc"};
var model = new NotesBarModel(repo, mapping);
model.SetTargetObject("xyz");
var annotationsToShow = model.GetAnnotationsToShow().ToList();
Assert.That(annotationsToShow, Has.Count.EqualTo(3));
Assert.That(annotationsToShow[0].Guid, Is.EqualTo("345"));
Assert.That(annotationsToShow[1].Guid, Is.EqualTo("567"));
Assert.That(annotationsToShow[2].Guid, Is.EqualTo("123"));
}
}


Expand Down
Loading

0 comments on commit 07c1cae

Please sign in to comment.