Closed d2lip closed 6 years ago
Could you share here the types of the arguments of the public methods of the class you want to create unit tests for?
Sure, maybe there a couple more details for this class that can help too.
``
public class IdentitySearchProvider : BaseSearchProvider<ISearchResultDoorEvent>, IIdentitySearchProvider
{
public IdentitySearchProvider(App.AccessControlGid identityId, EagleCs.TimeRange timeRange, IEnumerable<App.Gid> targetDevices, ISearchBase searchBase)
: this(identityId, new IdentitySearchSession(), new SearchImageRequestor(), null, new Thumbnails.IdentityResultItemFactory(), timeRange, targetDevices, searchBase)
{
}
public IdentitySearchProvider(App.AccessControlGid identityId, ISearchSession<ISearchResultDoorEvent> searchSession, ISearchImageRequestor imageRequestor, ISearchFacade facade, Thumbnails.IResultItemsFactory resultFactory, EagleCs.TimeRange timeRange, IEnumerable<App.Gid> targetDevices, ISearchBase searchBase, App.GuiManager guiManager = null)
: base(searchSession, imageRequestor, facade, resultFactory, timeRange, targetDevices, searchBase)
{
}
#region Overrides of BaseSearchProvider
public override IEnumerable<Thumbnails.IResultItem> ReferenceResults
{
get
{
}
}
public override bool RemoveGroupWithId(object id)
{
}
public override bool CanRemoveGroupWithId(object id)
{
}
public override Task<Thumbnails.IBaseResultItem> LoadReferenceImage(App.DeviceGid sourceDevice, DateTime objectTime, System.Windows.Rect roi)
{
}
public override ISearchParameters GetCurrentSearchParameters()
{
}
public override Task StarredThumbnailsChanged(IEnumerable<Thumbnails.IStarringResultItem> addedItems, IEnumerable<Thumbnails.IStarringResultItem> removedItems)
{
}
public override Task ResetSearch()
{
}
public override bool UserConfirmedAction()
{
}
public override bool CanUnstarLastResult()
{
}
#endregion
#region Overrides of BaseSearchProvider<ISearchResultDoorEvent>
public override void Dispose()
{
}
#endregion
#region Implementation of IIdentitySearchProvider
public bool FilterAccessDenied
{
get { }
set { }
}
public bool FilterAccessGranted
{
get { }
set { }
}
public bool ShouldShowOnlyAnalyticResults
{
get { }
set { }
}
#endregion
}
``
Also, I tried with other classes in that project and it works(but it didn't take my template changes), so there is something specific about this class.
All in all, seems like a great tool, hope to be able to use it soon!
Thanks! I believe your issue is not related to C++/CLI but rather to the usage of arguments with explicit namespace declaration like System.Windows.Rect; I have submitted a pull request
Released 1.9.6 with this fix.
Works like a charm now!
Thanks
Installed product versions
Description
Exception thrown when trying to create a new unit test file. First time using this extension.
Steps to recreate
Current behavior
Throws exception:
System.NotSupportedException: Parameter type not supported
at UnitTestBoilerplate.Services.TestGenerationService.GetSimpleTypeName(TypeSyntax argumentType) in C:\projects\unittestboilerplategenerator\src\Services\TestGenerationService.cs:line 372
at UnitTestBoilerplate.Services.TestGenerationService.GetArgumentDescriptors(List`1 argumentList, SemanticModel semanticModel, MockFramework mockFramework) in C:\projects\unittestboilerplategenerator\src\Services\TestGenerationService.cs:line 316
at UnitTestBoilerplate.Services.TestGenerationService.d__9.MoveNext() in C:\projects\unittestboilerplategenerator\src\Services\TestGenerationService.cs:line 231
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UnitTestBoilerplate.Services.TestGenerationService.d__17.MoveNext() in C:\projects\unittestboilerplategenerator\src\Services\TestGenerationService.cs:line 388
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UnitTestBoilerplate.Services.TestGenerationService.d__6.MoveNext() in C:\projects\unittestboilerplategenerator\src\Services\TestGenerationService.cs:line 57
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UnitTestBoilerplate.ViewModel.CreateUnitTestBoilerplateViewModel.d__54.MoveNext() in C:\projects\unittestboilerplategenerator\src\ViewModel\CreateUnitTestBoilerplateViewModel.cs:line 181
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UnitTestBoilerplate.ViewModel.CreateUnitTestBoilerplateViewModel.<b__53_0>d.MoveNext() in C:\projects\unittestboilerplategenerator\src\ViewModel\CreateUnitTestBoilerplateViewModel.cs:line 166
Expected behavior
It should create the test file, I guess? :)