• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Story类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Story的典型用法代码示例。如果您正苦于以下问题:C# Story类的具体用法?C# Story怎么用?C# Story使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Story类属于命名空间,在下文中一共展示了Story类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnEnable

 void OnEnable()
 {
     story = (Story)target;
     if (story.Forest == null) {
         story.Forest = new Forest();
     }
 }
开发者ID:microVoltage,项目名称:NB-N,代码行数:7,代码来源:StoryUI.cs


示例2: StoryViewModel

        public StoryViewModel(Story story)
        {
            Story = story;

            StartVM = new LocationScenarioViewModel(Story.StartingScenario, Story.StartingLocation, "Start");
            EndVM = new LocationScenarioViewModel(Story.EndingScenario, Story.EndingLocation, "End");
        }
开发者ID:randomgeekdom,项目名称:StorySuite,代码行数:7,代码来源:StoryViewModel.cs


示例3: verify_receive_appropriate_error_message_when_user_provides_a_bad_user_name_or_password

        public void verify_receive_appropriate_error_message_when_user_provides_a_bad_user_name_or_password()
        {
            AuthenticationStatus authStatus = null;
            Story authenticateUserStory = new Story("Authenticate User");

            authenticateUserStory.AsA("Unauthenticated user")
                .IWant("supply my user name and password to the login form")
                .SoThat("I can  authenticate to the application");

            authenticateUserStory
                .WithScenario("User provides an invalid user name")
                .Given("My user name and password are ", "Big Daddy", "Gobldegook", delegate(string userName, string password) { UserRepositoryFactory factory = _mock.DynamicMock<UserRepositoryFactory>();

                                                                                                                                 using (_mock.Record())
                                                                                                                                 {
                                                                                                                                    Expect.Call(factory.Create(userName, password))
                                                                                                                                        .Return(_mock.DynamicMock<IUserRepository>());
                                                                                                                                 }

                                                                                                                                 _user = factory.Create(userName, password); })
                .When("I authenticate the user", delegate {_service = _mock.DynamicMock<IAuthenticationService>();
                                                            using (_mock.Record())
                                                            {
                                                                Expect.Call(_service.Authenticate(_user))
                                                                    .Return(new AuthenticationStatus(new Exception("Bad Username or Password")));
                                                            }
                                                           authStatus = _service.Authenticate(_user);})
                .Then("I should receive an Authentication status of", Status.Failed, delegate(Status expectedStatus) {Assert.AreEqual(expectedStatus, authStatus.Status);});
        }
开发者ID:mmann2943,项目名称:berry-patch,代码行数:29,代码来源:AuthenticateUser.cs


示例4: verify_receive_appropriate_success_message_when_user_provides_a_good_user_name_and_password

        public void verify_receive_appropriate_success_message_when_user_provides_a_good_user_name_and_password()
        {
            Story authenticateUserStory = new Story("Authenticate User");

            authenticateUserStory.AsA("USer with a valid user name and password")
                .IWant("supply my user name and password to the login form")
                .SoThat("I can authenticate to the application");

            authenticateUserStory
                .WithScenario("User provides a valid user name and password")
                .Given("My user name and password are ", "mmann", "validpassword_1", delegate(string userName, string password) { UserRepositoryFactory factory = _mock.DynamicMock<UserRepositoryFactory>();

                                                                                                                                 using (_mock.Record())
                                                                                                                                 {
                                                                                                                                    Expect.Call(factory.Create(userName, password))
                                                                                                                                        .Return(_mock.DynamicMock<IUserRepository>());
                                                                                                                                 }

                                                                                                                                 _user = factory.Create(userName, password); })
                .When("I authenticate the user", delegate {_service = _mock.DynamicMock<IAuthenticationService>();
                                                            using (_mock.Record())
                                                            {
                                                                Expect.Call(_service.Authenticate(_user))
                                                                    .Return(new AuthenticationStatus());
                                                            }
                                                           _authStatus = _service.Authenticate(_user);})
                .Then("I should receive an Authentication status of", Status.Success, delegate(Status expectedStatus) {Assert.AreEqual(expectedStatus, _authStatus.Status);});
        }
开发者ID:mmann2943,项目名称:berry-patch,代码行数:28,代码来源:AuthenticateUser.cs


示例5: StoryController

 public StoryController()
 {
     defaultStory =
         new Story()
         {
             Id = 1,
             Name = "Holly Hope Aspinall",
             StoryTitle = "An Unexpected Journey",
             Events = new List<Event>()
             {
                 new Event
                 {
                     Id=1,
                     Title="Sticks The Landing",
                     Description="Holly was born today at 20:04 weighing in at 8lb 13oz",
                     DateTime=new DateTime(2015,06,12,20,04,00),
                     ImgUrl="Content/Images/dribbbleburger_1x.png",
                 },
                 new Event
                 {
                     Id=2,
                     Title="Welcome To The World",
                     Description="Holly is welcomed into the world by her grandparents",
                     DateTime=new DateTime(2015,06,12,22,00,00),
                     ImgUrl="Content/Images/Optionis.jpg",
                 },
             },
         };
 }
开发者ID:SimonAspinall9,项目名称:LifeStory,代码行数:29,代码来源:StoryController.cs


示例6: Battle

        public Battle()
        {
            if (story == null)
            {
                this.story = App.Story;
                this.hero = story.Hero;
                currentStatus = null;
            }

            InitializeComponent();

            buttons = new Dictionary<Type, Button>()
            {
                {typeof (Rock), RockButton},
                {typeof (Paper), PaperButton},
                {typeof (Scissors), ScissorsButton},
            };

            foreach (var button in buttons.Values)
            {
                button.Visibility = Visibility.Collapsed;
            }

            returnToNavi.Visibility = Visibility.Collapsed;

            RunBattle();
        }
开发者ID:Turrino,项目名称:RPS,代码行数:27,代码来源:Battle.xaml.cs


示例7: BulkGetUsersWithWrongGUID

        public void BulkGetUsersWithWrongGUID()
        {
            _story = new Story("Get Memebers By IMembershipApi");

            _story.AsA("User")
              .IWant("to be able to get members, and give wrong users' GUID")
              .SoThat("I can get nothing");

            IDictionary<Guid, UserObject> _Users = new Dictionary<Guid, UserObject>();

            Guid _temp = new Guid();

            _story.WithScenario("Get members by ImembershipApi with the only one correct Ids")
                .Given("only one correct GUID of user and fake one", () =>
                {
                    createdObjectIds.Add(_temp);
                })
                .When("I use the BulkGet, I can get users ", () => _Users = _membershipApi.BulkGet(createdObjectIds))
                .Then("The return a bunch of Users only contain null User ",
                        () =>
                        {
                            _Users[_temp].ShouldBeNull();
                        });

            //createdObjectIds.Remove(_temp);

            this.CleanUp();
        }
开发者ID:TatumAndBell,项目名称:RapidWebDev-Enterprise-CMS,代码行数:28,代码来源:BulkGetMembersStory.cs


示例8: Verify

 public void Verify()
 {
     _story = this.BDDfy();
     _story.Metadata.ShouldNotBe(null);
     _story.Metadata.Title.ShouldBe(StoryTitle);
     _story.Metadata.TitlePrefix.ShouldBe(StoryTitlePrefix);
 }
开发者ID:rronen10,项目名称:TestStack.BDDfy,代码行数:7,代码来源:StorySubclass.cs


示例9: TranslatePivotalToSolr

        public RequirementsDocument TranslatePivotalToSolr(Story pivotalstory)
        {
            //return null;

            return new RequirementsDocument()
                       {
                           ID = IDGenerator.GetUniqueIDForDocument(pivotalstory.Id.ToString(), _project.SystemType.ToDescription()),
                           Title = HttpUtility.HtmlEncode(pivotalstory.Name),
                           Status = pivotalstory.Current_State,
                           Project = _project.ProjectName,
                           Department = _project.Department,
                           SystemSource = _project.SystemType.ToDescription(),
                           LastIndexed = DateTime.Now,
                           Description = HttpUtility.HtmlEncode(pivotalstory.Description),
                           //AcceptanceCriteria = "Accepted At " + pivotalstory.AcceptedAt,
                           StoryPoints = pivotalstory.Estimate.ToString(),
                           ReleaseIteration = "tbd",
                           ReferenceID = "tbd",
                           StoryType = pivotalstory.Story_Type,
                           Team = pivotalstory.Owned_By,
                           //LastUpdated = pivotalstory.UpdatedAt,
                           StoryURI = pivotalstory.Url,
                           StoryTags = pivotalstory.Labels,
                           IterationStart = GetIterationDurationForStory(pivotalstory.Id,pivotalstory.Project_Id),
                           IterationEnd = GetIterationDurationForStory(pivotalstory.Id,pivotalstory.Project_Id)
                       };
        }
开发者ID:EAAppFoundry,项目名称:Apollo,代码行数:27,代码来源:PivotalTrackerMapper.cs


示例10: CopyAttributes

 public bool CopyAttributes(Story pivotalstorySource, WorkItem destinationWorkItem)
 {
     destinationWorkItem.Fields[ConchangoTeamsystemScrumEstimatedeffort].Value = pivotalstorySource.Estimate;
     destinationWorkItem.Fields[ConchangoTeamsystemScrumBusinesspriority].Value = pivotalstorySource.Priority;
     destinationWorkItem.Fields[ConchangoTeamsystemScrumDeliveryorder].Value = pivotalstorySource.Priority;
     return true;
 }
开发者ID:ricred,项目名称:PivotalTFS,代码行数:7,代码来源:Conchango_Template.cs


示例11: Create

        public Story Create(string storyName, string creatorId, IEnumerable<string> genreNames)
        {
            var existingGenres = this.genreRepository.All()
                .Where(x => genreNames.Contains(x.Name))
                .ToList();

            foreach (var genre in genreNames)
            {
                if (!existingGenres.AsQueryable().Select(x => x.Name).Contains(genre))
                {
                    var newGenre = new Genre
                    {
                        Name = genre
                    };

                    existingGenres.Add(newGenre);
                    this.genreRepository.Add(newGenre);
                }
            }

            this.genreRepository.Save();

            var story = new Story
            {
                AuthorId = creatorId,
                Name = storyName,
                Genres = existingGenres
            };

            this.storyRepository.Add(story);
            this.storyRepository.Save();

            return this.storyRepository.All()
                .FirstOrDefault(x => x.Name == story.Name);
        }
开发者ID:newmast,项目名称:Steep,代码行数:35,代码来源:StoryService.cs


示例12: MemberLoginWithCorrectUserNameAndPwd

        public void MemberLoginWithCorrectUserNameAndPwd()
        {
            _story = new Story("Login with UserName and Password");

            _story.AsA("User")
              .IWant("to be able to login ")
              .SoThat("I can use features");

            _story.WithScenario("login with a correct username and password")
                .Given("Create a new with old password", () =>
                {
                    _Uobject = _utils.CreateUserObject("Eunge Liu",true);

                    _oldpassword = "123Hello";

                    _newpassword = "Hello123456";

                    _membershipApi.Save(_Uobject, _oldpassword, "123Hello");

                    createdObjectIds.Add(_Uobject.UserId);

                })
                .When("I login", () =>
                {
                    _ret = _membershipApi.Login(_Uobject.UserName, _oldpassword);
                })
                .Then("The User can get Successful Logon",
                        () =>
                        {
                            _ret.ShouldEqual(LoginResults.Successful);
                        });

            this.CleanUp();
        }
开发者ID:TatumAndBell,项目名称:RapidWebDev-Enterprise-CMS,代码行数:34,代码来源:MemberLoginStory.cs


示例13: Verify

 public void Verify()
 {
     _story = this.BDDfy();
     Assert.That(_story.Metadata, Is.Not.Null);
     Assert.That(_story.Metadata.Title, Is.EqualTo(StoryTitle));
     Assert.That(_story.Metadata.TitlePrefix, Is.EqualTo(StoryTitlePrefix));
 }
开发者ID:JakeGinnivan,项目名称:TestStack.BDDfy,代码行数:7,代码来源:StorySubclass.cs


示例14: Process

        public void Process(Story story)
        {
            foreach (var scenario in story.Scenarios)
            {
                var executor = new ScenarioExecutor(scenario);
                executor.InitializeScenario();

                if (scenario.Example != null)
                {
                    var unusedValue = scenario.Example.Values.FirstOrDefault(v => !v.ValueHasBeenUsed);
                    if (unusedValue != null) throw new UnusedExampleException(unusedValue);
                }

                var stepFailed = false;
                foreach (var executionStep in scenario.Steps)
                {
                    if (stepFailed && ShouldExecuteStepWhenPreviousStepFailed(executionStep))
                        break;

                    if (executor.ExecuteStep(executionStep) == Result.Passed) 
                        continue;

                    if (!executionStep.Asserts)
                        break;

                    stepFailed = true;
                }
            }
        }
开发者ID:rronen10,项目名称:TestStack.BDDfy,代码行数:29,代码来源:TestRunner.cs


示例15: StoryContentPageViewModel

 public StoryContentPageViewModel(Story story, int index, int height, int width)
 {
     _story = story;
     _index = index;
     _width = width;
     _height = height;
 }
开发者ID:romanservices,项目名称:CodeSamples,代码行数:7,代码来源:StroyContentPageViewModel.cs


示例16: GetUserByCorrectGuid

        public void GetUserByCorrectGuid()
        {
            _story = new Story("Get Memebers By IMembershipApi");

            _story.AsA("User")
              .IWant("to be able to get members, and give the correct users' GUID")
              .SoThat("I can do somethings for members");

            IDictionary<Guid, UserObject> _Users = new Dictionary<Guid, UserObject>();

            _story.WithScenario("Get members by ImembershipApi with the correct userName")
                .Given("More than one correct GUID of users", () =>
                {
                    _Uobject = _utils.CreateUserObject("Eunge Liu", true);

                    _membershipApi.Save(_Uobject, "123Hello", "123Hello");

                    createdObjectIds.Add(_Uobject.UserId);

                })
                .When("I use the Get, I can get users ", () => _Uobject2 = _membershipApi.Get(_Uobject.UserId))
                .Then("The User2 is User1",
                        () =>
                        {
                            _Uobject.ShouldEqual(_Uobject2);
                        });

            this.CleanUp();
        }
开发者ID:TatumAndBell,项目名称:RapidWebDev-Enterprise-CMS,代码行数:29,代码来源:GetMemberStory.cs


示例17: StoryInfo

 internal StoryInfo(Story story_id, int pic, int pic1, int pic2)
 {
     this.story_id = story_id;
     this.pic = pic;
     this.pic1 = pic2;
     this.pic2 = pic2;
 }
开发者ID:DevTheo,项目名称:IFControlDemo,代码行数:7,代码来源:screen.cs


示例18: Process

        public void Process(Story story)
        {
            // use this report only for tic tac toe stories
            if (story.Metadata == null || !story.Metadata.Type.Name.Contains("TicTacToe"))
                return;

            var scenario = story.Scenarios.First();
            var scenarioReport = new StringBuilder();
            scenarioReport.AppendLine(string.Format(" SCENARIO: {0}  ", scenario.Title));

            if (scenario.Result != Result.Passed && scenario.Steps.Any(s => s.Exception != null))
            {
                scenarioReport.Append(string.Format("    {0} : ", scenario.Result));
                scenarioReport.AppendLine(scenario.Steps.First(s => s.Result == scenario.Result).Exception.Message);
            }

            scenarioReport.AppendLine();

            foreach (var step in scenario.Steps)
                scenarioReport.AppendLine(string.Format("   [{1}] {0}", step.Title, step.Result));

            scenarioReport.AppendLine("--------------------------------------------------------------------------------");
            scenarioReport.AppendLine();

            File.AppendAllText(Path, scenarioReport.ToString());
        }
开发者ID:mwhelan,项目名称:TestStack.BDDfy,代码行数:26,代码来源:CustomTextReporter.cs


示例19: Process

 public void Process(Story story)
 {
     foreach (var scenario in story.Scenarios)
     {
         Dispose(scenario);
     }
 }
开发者ID:rronen10,项目名称:TestStack.BDDfy,代码行数:7,代码来源:Disposer.cs


示例20: SetUp

        public override void SetUp()
        {
            sprint = new Sprint();
            story = new Story(new Project(), new Gebruiker(), null, StoryType.UserStory);

            base.SetUp();
        }
开发者ID:Pusaka,项目名称:JelloScrum,代码行数:7,代码来源:StoryTestGeefTakenLijsten.cs



注:本文中的Story类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# StrAccum类代码示例发布时间:2022-05-24
下一篇:
C# StoredProcedure类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap