-
Notifications
You must be signed in to change notification settings - Fork 562
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Public Factory Method for Rule Parameter From Type (#529)
Co-authored-by: YogeshPraj <[email protected]>
- Loading branch information
1 parent
d7c92c2
commit 6a747b3
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
using AutoFixture; | ||
using RulesEngine.Models; | ||
using System; | ||
using Xunit; | ||
|
||
namespace RulesEngine.UnitTest; | ||
public class RuleParameterTests | ||
{ | ||
[Fact] | ||
public void Create_SetsPropertiesCorrectly() | ||
{ | ||
var fixture = new Fixture(); | ||
var name = fixture.Create<string>(); | ||
var type = fixture.Create<Type>(); | ||
|
||
var result = RuleParameter.Create(name, type); | ||
|
||
Assert.Equal(name, result.Name); | ||
Assert.Equal(type, result.Type); | ||
} | ||
} |